Пример #1
0
        public override void Update()
        {
            base.Update();

            GetInput();
            currentSelected = (SelectedOptionBtn)menuNum;

            foreach (var label in labels)
            {
                label.Update();
            }

            foreach (var button in buttons)
            {
                button.Update();
            }

            buttons[menuNum].Color = new Color(237, 71, 86);
        }
Пример #2
0
        public OptionState()
        {
            muteLabel = new TextLabel("Volume", "Fonts\\PixelFont", new Vector2(270, 140), 1f, Color.White);
            modeLabel = new TextLabel("Mode", "Fonts\\PixelFont", new Vector2(270, 200), 1f, Color.White);
            credits   = new TextLabel("Credits", "Fonts\\PixelFont", new Vector2(270, 260), 1f, Color.White);
            tutorial  = new TextLabel("Tutorial", "Fonts\\PixelFont", new Vector2(270, 320), 1f, Color.White);

            this.labels = new List <TextLabel>()
            {
                muteLabel,
                modeLabel,
                credits,
                tutorial
            };

            backBtn = new Button("Back", "Fonts\\PixelFont", "Images\\btn-template", new Vector2(250, 450), new Vector2(200, 100));
            saveBtn = new Button("Save", "Fonts\\PixelFont", "Images\\btn-template", new Vector2(550, 450), new Vector2(200, 100));

            muteBtn     = new Button("Mute", "Fonts\\PixelFont", "Images\\btn-template", new Vector2(570, 140), new Vector2(150, 50), 0.5f);
            modeBtn     = new Button("Normal", "Fonts\\PixelFont", "Images\\btn-template", new Vector2(570, 200), new Vector2(150, 50), 0.5f);
            creditBtn   = new Button("Credits", "Fonts\\PixelFont", "Images\\btn-template", new Vector2(570, 260), new Vector2(150, 50), 0.5f);
            tutorialBtn = new Button("Tutorial", "Fonts\\PixelFont", "Images\\btn-template", new Vector2(570, 320), new Vector2(150, 50), 0.5f);

            bg_card = new GameObject("Images\\option_card", new Vector2(176, 100), new Vector2(671, 310));

            this.buttons = new List <Button>()
            {
                backBtn,
                saveBtn,
                tutorialBtn,
                creditBtn,
                modeBtn,
                muteBtn
            };

            currentSelected = (SelectedOptionBtn)menuNum;
        }