//Texture2D powerupsBackground; //Sprite coin; public override void Activate(bool instancePreserved) { EnabledGestures = GestureType.Tap | GestureType.Flick | GestureType.HorizontalDrag | GestureType.DragComplete; ContentManager content = ScreenManager.Game.Content; //background = content.Load<Texture2D>("GameScreens\\Instructions"); UIBackground = content.Load<Texture2D>("GameScreens\\UIdescriptionBG"); //powerupsBackground = content.Load<Texture2D>("GameScreens\\Instructions2"); Button = content.Load<Texture2D>("GameScreens\\Buttons\\B_TransparentMedium"); buttonFont = content.Load<SpriteFont>("menufont"); buttonFontSmall = content.Load<SpriteFont>("menufont12"); //coin = new Sprite(Config.CoinSpriteSheet); practise = new ButtonControl(Button, new Vector2(460, 370), "Practise", buttonFont); practise.Tapped += new EventHandler<EventArgs>(practiseButton_Tapped); //RootControl = new Control(); RootControl = new PageFlipControl(); instPanel = new LevelDescriptionPanel(content, "GameScreens\\Instructions"); UIPanel = new LevelDescriptionPanel(content, "GameScreens\\UIdescription"); powerupsPanel = new LevelDescriptionPanel(content, "GameScreens\\Instructions2"); RootControl.AddChild(instPanel); RootControl.AddChild(powerupsPanel); RootControl.AddChild(UIPanel); //RootControl.AddChild(practise); instPanel.AddChild(practise); base.Activate(instancePreserved); }
public override void Draw(GameTime gameTime) { tempControl = (PageFlipControl)RootControl; if (tempControl.Tracker.CurrentPage == 2) { ScreenManager.SpriteBatch.Begin(); ScreenManager.SpriteBatch.Draw(UIBackground, Vector2.Zero, Color.White); ScreenManager.SpriteBatch.End(); } base.Draw(gameTime); }