Example #1
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public IngameMenu()
        {
            this.buttonList = new UIButtonList();
            this.buttonList.ScrollThrough = true;

            this.continueGameButton = new UIButton("DefaultButton", "SelectedButton");
            this.continueGameButton.Text = "Continue";
            this.continueGameButton.OnAction += new ButtonActionDelegate(ContinueGame);
            this.continueGameButton.Position = new Vector2(200.0f, 200.0f);

            this.saveGameButton = new UIButton("DefaultButton", "SelectedButton");
            this.saveGameButton.Text = "Save Game";
            this.saveGameButton.OnAction += new ButtonActionDelegate(SaveGame);
            this.saveGameButton.Position = new Vector2(200.0f, 270.0f);

            this.exitButton = new UIButton("DefaultButton", "SelectedButton");
            this.exitButton.Text = "Exit";
            this.exitButton.OnAction += new ButtonActionDelegate(Exit);
            this.exitButton.Position = new Vector2(200.0f, 340.0f);

            this.buttonList.Buttons.Add(this.continueGameButton);
            this.buttonList.Buttons.Add(this.saveGameButton);
            this.buttonList.Buttons.Add(this.exitButton);

            this.Children.Add(this.buttonList);
        }
Example #2
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public LoadScreen()
            : base("MainMenu")
        {
            this.buttonList = new UIButtonList();
            this.buttonList.ScrollThrough = true;

            this.slot1 = new UIButton("DefaultButton", "SelectedButton");
            this.slot1.Text = "Empty";
            this.slot1.OnAction += new ButtonActionDelegate(Slot1Action);
            this.slot1.Position = new Vector2(200.0f, 250.0f);

            this.slot2 = new UIButton("DefaultButton", "SelectedButton");
            this.slot2.Text = "Empty";
            this.slot2.OnAction += new ButtonActionDelegate(Slot2Action);
            this.slot2.Position = new Vector2(200.0f, 320.0f);

            this.slot3 = new UIButton("DefaultButton", "SelectedButton");
            this.slot3.Text = "Empty";
            this.slot3.OnAction += new ButtonActionDelegate(Slot3Action);
            this.slot3.Position = new Vector2(200.0f, 390.0f);

            this.slot4 = new UIButton("DefaultButton", "SelectedButton");
            this.slot4.Text = "Empty";
            this.slot4.OnAction += new ButtonActionDelegate(Slot4Action);
            this.slot4.Position = new Vector2(200.0f, 460.0f);

            this.buttonList.Buttons.Add(this.slot1);
            this.buttonList.Buttons.Add(this.slot2);
            this.buttonList.Buttons.Add(this.slot3);
            this.buttonList.Buttons.Add(this.slot4);

            this.Children.Add(this.buttonList);
        }
Example #3
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public GameOverScreen()
            : base("GameOver")
        {
            this.buttonList = new UIButtonList();
            this.buttonList.ScrollThrough = true;

            this.mainMenuButton = new UIButton("DefaultButton", "SelectedButton");
            this.mainMenuButton.Text = "Main Menu";
            this.mainMenuButton.OnAction += new ButtonActionDelegate(mainMenuButton_OnAction);
            this.mainMenuButton.Position = new Vector2(200.0f, 320.0f);

            this.exitButton = new UIButton("DefaultButton", "SelectedButton");
            this.exitButton.Text = "Exit";
            this.exitButton.OnAction += new ButtonActionDelegate(exitButton_OnAction);
            this.exitButton.Position = new Vector2(200.0f, 390.0f);

            this.buttonList.Buttons.Add(this.mainMenuButton);
            this.buttonList.Buttons.Add(this.exitButton);

            this.Children.Add(this.buttonList);
        }