Beispiel #1
0
        private void addStartButton()
        {
            Texture2D buttonImage = Content.Load <Texture2D>("GUI/start_button");

            buttonMenu = new ButtonMenu(lhg, lhg.NormalFont, buttonImage, 5, this);

            string[] items = { "Start" };

            buttonMenu.SetMenuItems(items);
            buttonMenu.Position      = new Vector2(700, 500);
            buttonMenu.SelectedIndex = 0;
        }
        public CreditScreen(Game game)
            : base(game)
        {
            LoadContent();
            Components.Add(new BackgroundComponent(game, background, true));
            string[] items = { "RETURN TO MENU" };

            buttonMenu = new ButtonMenu(game, spriteFont, buttonImage);
            buttonMenu.SetMenuItems(items);
            Components.Add(buttonMenu);

            position = new Vector2(0, 0);
        }
Beispiel #3
0
        public void loadActionMenu()
        {
            Texture2D actionButton = lhg.Content.Load <Texture2D>("GUI/blackbutton");

            actionMenu = new ButtonMenu(lhg, this.lhg.SmallFont, actionButton, 0, this);
            string[] items = { "Attack",
                               "Move",
                               "Defend",
                               "Use",
                               "Inventory",
                               "End Turn" };
            actionMenu.SetMenuItems(items);
            actionMenu.HiliteColor  = Color.Red;
            actionMenu.NormalColor  = Color.White;
            this.actionMenu.Visible = false;
        }
Beispiel #4
0
        public QuitGameScreen(Game game)
            : base(game)
        {
            LoadContent();

            Components.Add(new BackgroundComponent(game, image, false));

            imagePosition   = new Vector2();
            imagePosition.X = (game.Window.ClientBounds.Width - image.Width) / 2;
            imagePosition.Y = (game.Window.ClientBounds.Height - image.Height) / 2;

            string[] items = { "YES", "NO" };
            menu = new ButtonMenu(game, spriteFont, buttonImage);
            menu.SetMenuItems(items);
            Components.Add(menu);
        }
Beispiel #5
0
        public ClassPopUpScreen(Game game)
            : base(game)
        {
            LoadContent();

            Components.Add(new BackgroundComponent(game, image, false));

            imagePosition   = new Vector2();
            imagePosition.X = (game.Window.ClientBounds.Width - image.Width) / 2;
            imagePosition.Y = (game.Window.ClientBounds.Height - image.Height) / 2;

            string[] items = Enum.GetNames(typeof(CharClass));

            menu = new ButtonMenu(game, spriteFont, buttonImage);
            menu.SetMenuItems(items);
            Components.Add(menu);
        }