protected override void LoadContent() { _spriteBatch = new SpriteBatch(GraphicsDevice); GameAssets.LoadContent(Content); // PANEL: TestPanel = GameAssets.ConstructPanel("TestPanel", "Test Panel"); TestPanel.MoveStarted += Panel_MoveStarted; TestPanel.MoveEnded += Panel_MoveEnded; TestPanel.Moved += Panel_Moved; ViewportBorder = new Sprite(TextureMaker.MakeBorder(Color.Red, 255, TestPanel.Viewport.Bounds)); // LABELS: LabelStatus = new Label(GameAssets.BtnStyle, "Status Message"); TestPanel.Add( LabelStatus, AnchorPreference.Panel, AnchorAlignment.Inside_Top_Right, new PositionOffset(-100, 35) ); LabelMoveStatus = new Label(GameAssets.BtnStyle, "---"); TestPanel.Add(LabelMoveStatus, AnchorPreference.Last, AnchorAlignment.Below_Left, new PositionOffset(0, 10) ); LabelViewportBounds = new Label(GameAssets.BtnStyle, ""); TestPanel.Add( LabelViewportBounds, AnchorPreference.Last, AnchorAlignment.Below_Left, new PositionOffset(0, 6) ); LabelMousePosition = new Label(GameAssets.BtnStyle, ""); TestPanel.Add( LabelMousePosition, AnchorPreference.Last, AnchorAlignment.Below_Left, new PositionOffset(0, 6) ); // BUTTON: Button btn = GameAssets.ConstructButton("Btn1", "Click Me"); btn.Clicked += Btn1_Clicked; TestPanel.Add( btn, AnchorPreference.Panel, AnchorAlignment.Inside_Top_Left, new PositionOffset(20, 30) ); // CHECKBOX: Checkbox box = GameAssets.ConstructCheckbox("Ck1", "Not Checked"); box.Checked += Ck1_Checked; box.Unchecked += Ck1_Unchecked; TestPanel.Add( box, AnchorPreference.Last, AnchorAlignment.Below_Left, new PositionOffset(0, 20) ); }
protected override void LoadContent() { _spriteBatch = new SpriteBatch(GraphicsDevice); GameAssets.LoadContent(Content); }