Esempio n. 1
0
        public NavigationWindow()
        {
            var width  = Console.WindowWidth;
            var height = Console.WindowHeight;

            titleLabel = new GUI.Label(0, 0, width, 1, MenuColor.NavigationWindowTitleBG, MenuColor.NavigationWindowTitleFG, Text.NavigationWindowTitle)
            {
                HorizontalAlignment = Properties.HorizontalAlignment.Center
            };

            windowsMenu = new GUI.ColumnView(2, 3, 40, 10, MenuColor.ContentBG, MenuColor.ContentFG, 1);
            windowList  = windowsMenu.AddListBox(0, Text.NavigationWindowListHeader, false);
            windowList.SetItems(Program.windowNames);

            windowNumberTextBox = new GUI.TextBox(0, 4, 1, 10, MenuColor.ContentBG, MenuColor.ContentFG)
            {
                Content = new string[Program.windowNames.Length]
            };
            for (int i = 0; i < Program.windowNames.Length; i++)
            {
                windowNumberTextBox.Content[i] = (i + 1).ToString();
            }

            controlsLabel = new GUI.Label(0, height - 1, width - 1, 1, MenuColor.ControlsBG, MenuColor.ControlsFG, Text.DefaultControls);
        }
Esempio n. 2
0
        public void Init()
        {
            int width  = Console.WindowWidth;
            int height = Console.WindowHeight;

            Title = new GUI.Label(0, 0, width, TitleHeight, titleBG, titleFG, title)
            {
                HorizontalAlignment = Properties.HorizontalAlignment.Center
            };
            ControlsLabel = new GUI.Label(
                0, height - ControlsLabelHeight,
                width - 1, ControlsLabelHeight,
                MenuColor.ControlsBG, MenuColor.ControlsFG,
                Text.DefaultControls);
            LogTextBox = new GUI.TextBox(
                0, ControlsLabel.Top - TextBoxesCommandsDistance - LowerTextBoxesHeight,
                width, LowerTextBoxesHeight,
                MenuColor.ContentBG, MenuColor.ContentFG);
            CommandLogSeparator = new GUI.Box(
                0, LogTextBox.Top - CommandLogSeparatorHeight,
                width, CommandLogSeparatorHeight,
                MenuColor.SeparatorBG, MenuColor.SeparatorFG);
            SelectionPrompt = new GUI.SelectionPrompt(
                0, CommandLogSeparator.Top - SelectionPromptHeight,
                width, SelectionPromptHeight,
                MenuColor.ContentBG, MenuColor.ContentFG);
            MenuCommandSeparator = new GUI.Box(
                0, SelectionPrompt.Top - MenuCommandSeparatorHeight,
                width, 1, MenuColor.SeparatorBG, MenuColor.SeparatorFG);
            Menu = new GUI.ColumnView(
                0, TitleHeight,
                width, height - TitleHeight - BottomAlignedHeight,
                MenuColor.ContentBG, MenuColor.ContentFG,
                2);
        }