This recipe looks at the relationship between widgets. We are going to build a scrollable panel that contains another panel that is filled with an array of buttons and then demonstrate how they respond as a single unit.
Load up PlayStation Mobile Studio and create a new project. Add a reference to Sce.PlayStation.HighLevel.UI
. The project is available in Ch6_Example3
.
Open AppMain.cs
and edit the code to match the following:
using System; using Sce.PlayStation.Core; using Sce.PlayStation.Core.Graphics; using Sce.PlayStation.Core.Input; using Sce.PlayStation.HighLevel.UI; namespace Ch6_Example3 { public class AppMain { public static void Main() { GraphicsContext graphics = new GraphicsContext(); UISystem.Initialize(graphics); var scene = new Sce.PlayStation.HighLevel.UI.Scene(); var scrollPanel = new Sce.PlayStation.HighLevel.UI.ScrollPanel(); scrollPanel.SetPosition(0,0...