public void LoadSettings()
 {
     if (Application.Current.Properties.ContainsKey("ColourScheme"))
     {
         ColourScheme = (ColourSchemes)Application.Current.Properties["ColourScheme"];
     }
     if (Application.Current.Properties.ContainsKey("PlaySound"))
     {
         PlaySound = (bool)Application.Current.Properties["PlaySound"];
     }
 }
Exemple #2
0
        private void AddColourSchemes()
        {
            var colourSchemesSettings = ModelSetupWizardSettings.Default.ColourSchemes;

            foreach (var colourSchemeConfigString in colourSchemesSettings)
            {
                if (string.IsNullOrEmpty(colourSchemeConfigString))
                {
                    continue;
                }
                ColourSchemes.Add(new ColourScheme(colourSchemeConfigString));
            }
        }
Exemple #3
0
        public MainForm()
        {
            InitializeComponent();
            Size drawableSize = new Size(1600, 900);

            this.ClientSize = drawableSize;
            Drawing.SetScreen(drawableSize);
            this.ResizeRedraw = true;

            ColourSchemes.Add("std");
            ColourSchemes.Set("std");
            ColourSchemes.Add("std", "dark", Color.FromArgb(255, 32, 32, 32));
            ColourSchemes.Add("std", "medium", Color.FromArgb(255, 64, 64, 64));
            ColourSchemes.Add("std", "light", Color.FromArgb(255, 128, 128, 128));
            ColourSchemes.Add("std", "green", Color.Green);
            ColourSchemes.Add("std", "red", Color.Red);

            Fonts.Add("medium", 0.05f);
            Fonts.Add("bold", 0.05f, FontStyle.Bold);
            Fonts.Recalculate();

            Scenes.Add("agenda");
            Scenes.Set("agenda");

            Trui.Label menu = new Trui.Label(new Space(0f, 0f, 0.2f, 1f), "dark");
            Trui.Label test = new Trui.Label(new Space(), "medium");
            uint       w = 5, h = 3;
            Grid       grid = new Grid(new Space(true), w, h);

            for (int x = 0; x < w; x++)
            {
                for (int y = 0; y < h; y++)
                {
                    Trui.Label l = new Trui.Label(new Space(), "medium");
                    grid.AddPaddedEven(l, 0.1f, true, (uint)x, (uint)y);
                }
            }
            menu.Add(grid);
            Scenes.Add(menu);

            Trui.Button button = new Trui.Button(new Space(0.3f, 0.1f, 0.4f, 0.1f), () => { Console.WriteLine("hello"); }, "medium", "light", "green",
                                                 "red", "click me boi", "medium");
            Scenes.Add(button);
        }
 public Preferences()
 {
     ColourScheme = ColourSchemes.Blue;
     PlaySound    = false;
 }
Exemple #5
0
    private void SetColourScheme(ColourSchemes scheme)
    {
        switch (scheme)
        {
            case ColourSchemes.Dark:
                BlackMaterial.color = BlackColour;
                WhiteMaterial.color = WhiteColour;
                Camera.main.GetComponent<MKGlow>().GlowIntensity = 0.15f;
                break;
            case ColourSchemes.Light:
                BlackMaterial.color = WhiteColour;
                WhiteMaterial.color = BlackColour;
                Camera.main.GetComponent<MKGlow>().GlowIntensity = 0.20f;
                break;
        }

        ScoreText.material.color = BlackMaterial.color;

        Camera.main.GetComponent<MKGlow>().enabled = EnableBloom;
    }