Exemplo n.º 1
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public UIButtonGrid(UInt16 rows, UInt16 columns)
        {
            this.rows = rows;
            this.columns = columns;

            this.buttons = new UIGridButton[rows, columns];
            this.selector = new StaticImage("GridButtonSelector");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public BattleUI()
            : base("BattleUI")
        {
            this.opponentName = new StaticText(FSEGame.Singleton.DefaultFont);
            this.opponentName.Text = "<OPPONENT NAME>";
            this.opponentName.Position = new Vector2(50, 20);
            this.opponentName.TextColour = Color.Black;
            this.opponentName.HasShadow = false;

            this.playerName = new StaticText(FSEGame.Singleton.DefaultFont);
            this.playerName.Text = "Landor";
            this.playerName.Position = new Vector2(445, 385);
            this.playerName.TextColour = Color.Black;
            this.playerName.HasShadow = false;

            this.bossIcon = new StaticImage("Boss");
            this.bossIcon.Position = new Vector2(350, 20);
            this.bossIcon.Visible = false;

            this.opponentHealthBar = new UIProgressBar("ProgressBar", "ProgressBarFilled");
            this.opponentHealthBar.Position = new Vector2(35, 50);
            this.opponentHealthBar.Maximum = 100;
            this.opponentHealthBar.Value = 100;

            this.playerHealthBar = new UIProgressBar("ProgressBar", "ProgressBarFilled");
            this.playerHealthBar.Position = new Vector2(430, 415);
            this.playerHealthBar.Maximum = 100;
            this.playerHealthBar.Value = 100;

            this.mainBattleMenu = new UIButtonGrid(2, 2);
            this.mainBattleMenu.Visible = false;
            this.mainBattleMenu.Buttons[0, 0] = new UIGridButton("Attack", new Vector2(70, 500));
            this.mainBattleMenu.Buttons[0, 1] = new UIGridButton("Magic", new Vector2(500, 500));
            this.mainBattleMenu.Buttons[1, 0] = new UIGridButton("Items", new Vector2(70, 540));
            this.mainBattleMenu.Buttons[1, 1] = new UIGridButton("Skip?", new Vector2(500, 540));

            this.attackMenu = new UIButtonGrid(2, 2);
            this.attackMenu.Visible = false;
            this.attackMenu.Buttons[0, 0] = new UIGridButton("<MOVE 1>", new Vector2(70, 500));
            this.attackMenu.Buttons[0, 1] = new UIGridButton("<MOVE 2>", new Vector2(500, 500));
            this.attackMenu.Buttons[1, 0] = new UIGridButton("Back", new Vector2(70, 540));
            this.attackMenu.Buttons[1, 1] = new UIGridButton("<MOVE 3>", new Vector2(500, 540));

            base.Children.Add(this.opponentName);
            base.Children.Add(this.playerName);
            base.Children.Add(this.bossIcon);
            base.Children.Add(this.opponentHealthBar);
            base.Children.Add(this.playerHealthBar);
            base.Children.Add(this.mainBattleMenu);
            base.Children.Add(this.attackMenu);
        }