In this recipe we are going to look at handling touch gestures such as double tapping and swiping. Additionally, in response to certain gestures, we are going to apply a couple of the built-in UI special effects.
Load up PlayStation Mobile Studio and create a new project. Add a reference to Sce.PlayStation.HighLevel.UI
. We are going to be re-using our FA-18h.png
image, but feel free to substitute any appropriate image. The entire project including images is available in Ch6_Example4
.
Open AppMain.cs
and replace Main
with the following code:
public static void Main (string[] args) { var graphics = new GraphicsContext (); UISystem.Initialize(graphics); graphics.SetClearColor (0.0f, 0.0f, 0.0f, 0.0f); Panel panel = new Panel(); panel.Width = graphics.Screen.Width; panel.Height = graphics.Screen.Height; ImageBox imageBox = new ImageBox(); imageBox.Image = new ImageAsset("/Application/FA-18h.png"); ...