Exemple #1
0
        public Container()
        {
            EditingColors = SadConsole.UI.Themes.Library.Default.Colors.Clone();
            //EditingColors = SadConsole.UI.Colors.CreateSadConsoleBlue();

            OptionsPanel = new ControlsConsole(6, 2);
            Border.AddToSurface(OptionsPanel, "");
            OptionsPanel.Position = (2, 1);

            Button button = new Button(6, 1)
            {
                Text = "Load", Position = (0, 0)
            };

            button.Click += ButtonLoad_Click;
            OptionsPanel.Controls.Add(button);

            button = new Button(6, 1)
            {
                Text = "Save", Position = (0, 1)
            };
            button.Click += ButtonSave_Click;
            OptionsPanel.Controls.Add(button);

            SettingsPanel = new SettingsConsole(30, 36);
            Border.AddToSurface(SettingsPanel, "Settings");
            SettingsPanel.Position = (4, 3);

            TestingPanel = new ControlsTest();
            Border.AddToSurface(TestingPanel, "Preview");
            TestingPanel.Position             = SettingsPanel.Position + (SettingsPanel.Surface.Area.Width, 0) + (4, 0);
            TestingPanel.Controls.ThemeColors = EditingColors;

            Children.Add(SettingsPanel);
            Children.Add(OptionsPanel);
            Children.Add(TestingPanel);
        }