Ejemplo n.º 1
0
 public OptionScreen(ScreenManager screenManager)
     : base(screenManager)
 {
     optionWidget = new MenuWidget(spriteBatch, "Textures\\UI\\bear", "Options Menu", -500, body.Center.X, body.Height / 2, body.Top, Widget.Anchor.TOP_CENTER);
     optionWidget.AddMenuItem("Back", ToMainScreen);
     widgets.Add(optionWidget);
 }
Ejemplo n.º 2
0
        public MainScreen(ScreenManager screenManager)
            : base(screenManager)
        {
            //TextButtonWidget textButtonWidget = new TextButtonWidget(spriteBatch, "test", 0, body.Center.X, 0, body.Center.Y, Widget.Anchor.MID_CENTER);
            //menuWidget = new MenuWidget(spriteBatch, 0, body.Center.X, 0, body.Center.Y, Widget.Anchor.MID_CENTER);

            //menuWidget.AddMenuItem(new MenuItem("Play", removeMenu, "Fonts\\SpriteFont1"));
            //menuWidget.AddMenuItem(new MenuItem("Options", toOptionsScreen, "Fonts\\SpriteFont1"));
            //menuWidget = new MenuWidget(spriteBatch, "Textures\\UI\\bear", "Main Menu", 0, body.Center.X, 0, body.Top, Widget.Anchor.TOP_CENTER);
            //menuWidget = new MenuWidget(spriteBatch, "Textures\\UI\\bear", "Main Menu", 0, body.Center.X, 400, body.Top, Widget.Anchor.BOTTOM_CENTER);
            System.Diagnostics.Debug.WriteLine(body.Height);
            menuWidget = new MenuWidget(spriteBatch, "Textures\\UI\\bear", "Main Menu", -500, body.Center.X, body.Height/2 , body.Top, Widget.Anchor.TOP_CENTER);
            menuWidget.AddMenuItem("Play", ToGameScreen);
            menuWidget.AddMenuItem("Options", ToOptionsScreen);
            ModelDisplayWidget mdw = new ModelDisplayWidget(spriteBatch, "Textures\\UI\\temp", 500, body.Center.X, body.Height / 2, body.Top, Widget.Anchor.TOP_CENTER);
            widgets.Add(menuWidget);
            widgets.Add(mdw);
            //widgets.Add(new TextButtonWidget(spriteBatch, "jimmy beatle garbage pants", ToOptionsScreen, 0, body.Left, 0, body.Top, Widget.Anchor.TOP_LEFT));
        }