public static void Init()
        {
            screenWidth  = ScreenManager.screenWidth;
            screenHeight = ScreenManager.screenHeight;

            RightBorderLine            = new Rectangle();
            RightBorderLine.BorderType = Shapes.BORDER_TYPE.Single;
            RightBorderLine.Create(
                new Point(ScreenManager.screenWidth - 30 - 2, ScreenManager.MapWidowHeight + ScreenManager.HUDHeight + (ScreenManager.DefaultBorder * 2)),
                new Size(32, ScreenManager.HUDHeight + (ScreenManager.DefaultBorder * 2)),
                BorderColor, ConsoleColor.Black);

            BorderLine            = new Rectangle();
            BorderLine.BorderType = Shapes.BORDER_TYPE.Single;
            BorderLine.Create(
                new Point(0, ScreenManager.MapWidowHeight + ScreenManager.HUDHeight + (ScreenManager.DefaultBorder * 2)),
                new Size(ScreenManager.MapWindowsWidth + (ScreenManager.DefaultBorder * 2) - 32,
                         ScreenManager.HUDHeight + (ScreenManager.DefaultBorder * 2)),
                BorderColor, ConsoleColor.Black);

            //Top Title
            InstrutionLabel = new TextBox();
            InstrutionLabel.Create(new Point(2, ScreenManager.screenHeight - 3),
                                   new Size(ScreenManager.screenWidth - 32 - 4 - 1, 1), ConsoleColor.White, ConsoleColor.Black);
            //InstrutionLabel.alighnment = TextBox.ALIGN_ENUM.Centre_Justify;
            InstrutionLabel.textItem = InstrutionLabelStrVal;

            /* Text Box for the Options Menu */
            menutxtBox = new MenuTextBox();
            menutxtBox.Create(
                new Point(ScreenManager.screenWidth - 30, ScreenManager.MapWidowHeight + ScreenManager.HUDHeight + (ScreenManager.DefaultBorder * 2) + 1),
                new Size(29, 9),
                ConsoleColor.White, ConsoleColor.Black);
            menutxtBox.lineItem = menuOptions;

            messagebox = new MultiLineTextBox();
            messagebox.Create(
                new Point(2, ScreenManager.MapWidowHeight + ScreenManager.HUDHeight + (ScreenManager.DefaultBorder * 2) + 1),
                new Size(ScreenManager.screenWidth - 32 - 4 - 1, 9),
                ConsoleColor.White, ConsoleColor.Black);
            messagebox.textItem = "1234567890123456789012345678901234567890123456789012345678901234567890ABCDEFGHIJKLMNOP";
        }
Example #2
0
        /*
         * public static void UpdateArmourLevel(int level)
         * {
         *  ArmourBar.Percent = level;
         *  ArmourBar.draw();
         * }
         */

        public static void Init()
        {
            PanelWidth  = (ScreenManager.screenWidth - ScreenManager.RoomMapWindowsWidth) / 2 - 1;
            PanelHeight = ScreenManager.MapWidowHeight;

            BorderLine            = new Rectangle();
            BorderLine.BorderType = Shapes.BORDER_TYPE.Single;
            BorderLine.Create(
                new Point(
                    ((ScreenManager.screenWidth - ScreenManager.RoomMapWindowsWidth) / 2) + ScreenManager.RoomMapWindowsWidth + 1,
                    ScreenManager.HUDHeight + 2),
                new Size(
                    (ScreenManager.screenWidth - ScreenManager.RoomMapWindowsWidth) / 2 - 1,
                    ScreenManager.MapWidowHeight),
                BorderColor, ConsoleColor.Black);

            UIPosCol = ((ScreenManager.screenWidth - ScreenManager.RoomMapWindowsWidth) / 2) + ScreenManager.RoomMapWindowsWidth + 1;
            UIPosRow = ScreenManager.HUDHeight + 2;

            //Top Title
            TitleLabel = new TextBox();
            TitleLabel.Create(
                new Point(UIPosCol + 2, UIPosRow + 1),
                new Size(PanelWidth - 4, 1),
                ConsoleColor.Yellow,
                ConsoleColor.Black);
            TitleLabel.alighnment = TextBox.ALIGN_ENUM.Left_Justify;
            TitleLabel.textItem   = "Legend";

            //HealthLevelTitleLabel
            HealthLevelTitleLabel = new TextBox();
            HealthLevelTitleLabel.Create(
                new Point(UIPosCol + 2, UIPosRow + 15),
                new Size(PanelWidth - 4, 1),
                ConsoleColor.Yellow,
                ConsoleColor.Black);
            HealthLevelTitleLabel.alighnment = TextBox.ALIGN_ENUM.Left_Justify;
            HealthLevelTitleLabel.textItem   = "Health Level";

            //HealthBar

            HealthBar = new PercentageBar();
            HealthBar.Create(
                new Point(UIPosCol + 2, UIPosRow + 17),
                new Size(PanelWidth - 4, 1),
                ConsoleColor.White,
                ConsoleColor.Black);
            HealthBar.BarWidth = 20;
            HealthBar.Percent  = 100;


            //EnemyTitleLabel

            EnemyTitleLabel = new TextBox();
            EnemyTitleLabel.Create(
                new Point(UIPosCol + 2, UIPosRow + 19),
                new Size(PanelWidth - 4, 1),
                ConsoleColor.Yellow,
                ConsoleColor.Black);
            EnemyTitleLabel.alighnment = TextBox.ALIGN_ENUM.Left_Justify;
            EnemyTitleLabel.textItem   = "";


            //EnemyHealthBar

            EnemyHealthBar = new PercentageBarEx1();
            EnemyHealthBar.Create(
                new Point(UIPosCol + 2, UIPosRow + 21),
                new Size(PanelWidth - 4, 1),
                ConsoleColor.White,
                ConsoleColor.Black);
            EnemyHealthBar.BarWidth = 20;
            EnemyHealthBar.Percent  = 0;


            /* Text Box for the Options Menu */
            menutxtBox = new MenuTextBox();
            menutxtBox.Create(
                new Point(UIPosCol + 2, UIPosRow + 3),
                new Size(PanelWidth - 4, 11),
                ConsoleColor.White, ConsoleColor.Black);
            menutxtBox.lineItem = menuOptions;
        }