public override void Initialize()
        {
            base.Initialize();
            background        = new BackBox();
            background.ZOrder = -2000000;
            Manager.Scene.AddEntity(background);

            // Texto de la pregunta:
            caption = new Label();
            Manager.Scene.AddEntity(caption);
            caption.Location  = new Vector2(Manager.Graphics.ScreenBounds.Center.X, Manager.Graphics.ScreenBounds.Center.Y - 50);
            caption.SmallFont = false;
            caption.Center    = true;
            caption.ZOrder    = -2000001;

            // Indicaciones de input:
            ok = new InputHintLabel();
            Manager.Scene.AddEntity(ok);
            ok.Button   = InputHintLabel.GamepadButtonChar.A;
            ok.Caption  = Session.Strings["button_confirm"];
            ok.Location = new Vector2(450, Manager.Graphics.ScreenSafeArea.Bottom - 225);
            ok.ZOrder   = -2000002;

            cancel = new InputHintLabel();
            Manager.Scene.AddEntity(cancel);
            cancel.Button   = InputHintLabel.GamepadButtonChar.B;
            cancel.Caption  = Session.Strings["button_cancel"];
            cancel.Location = new Vector2(750, Manager.Graphics.ScreenSafeArea.Bottom - 225);
            cancel.ZOrder   = -2000002;
        }
Example #2
0
        public override void Initialize()
        {
            base.Initialize();

            background = new BackBox();
            Manager.Scene.AddEntity(background);
            background.ZOrder = -1000000;

            title = new Label();
            Manager.Scene.AddEntity(title);
            title.Caption  = Session.Strings["pause_title"];
            title.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X, 200);
            title.Center   = true;
            title.ZOrder   = -1000001;

            menu = new ButtonGroup();
            Manager.Scene.AddEntity(menu);
            menu.Location     = new Vector2(Manager.Graphics.ScreenBounds.Center.X, 300);
            menu.ButtonHeight = 70;
            menu.OnExit      += OnEnterResume;
            menu.ZOrder       = -1000002;

            Button button;

            button          = new Button();
            button.Caption  = Session.Strings["pause_resume"];
            button.OnEnter += OnEnterResume;
            menu.Add(button);

            button          = new Button();
            button.Caption  = Session.Strings["pause_reset"];
            button.OnEnter += OnEnterReset;
            menu.Add(button);

            button          = new Button();
            button.Caption  = Session.Strings["pause_exit"];
            button.OnEnter += OnEnterExit;
            menu.Add(button);

            // Indicaciones de input:
            hints = new List <InputHintLabel>();

            InputHintLabel inputHint = new InputHintLabel();

            Manager.Scene.AddEntity(inputHint);
            inputHint.Button   = InputHintLabel.GamepadButtonChar.A;
            inputHint.Caption  = Session.Strings["button_select"];
            inputHint.Location = new Vector2(384, Manager.Graphics.ScreenSafeArea.Bottom - 100);
            inputHint.ZOrder   = -1000002;
            hints.Add(inputHint);

            inputHint = new InputHintLabel();
            Manager.Scene.AddEntity(inputHint);
            inputHint.Button   = InputHintLabel.GamepadButtonChar.B;
            inputHint.Caption  = Session.Strings["button_back"];
            inputHint.Location = new Vector2(616, Manager.Graphics.ScreenSafeArea.Bottom - 100);
            inputHint.ZOrder   = -1000002;
            hints.Add(inputHint);

            inputHint = new InputHintLabel();
            Manager.Scene.AddEntity(inputHint);
            inputHint.Button   = InputHintLabel.GamepadButtonChar.LeftThumb;
            inputHint.Caption  = Session.Strings["button_move"];
            inputHint.Location = new Vector2(825, Manager.Graphics.ScreenSafeArea.Bottom - 100);
            inputHint.ZOrder   = -1000002;
            hints.Add(inputHint);

            if (MusicPlayer.Volume > 0)
            {
                MusicPlayer.Volume /= 2;
            }
        }