diff options
| author | Michael <[email protected]> | 2017-07-26 09:59:48 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-07-26 09:59:48 -0400 |
| commit | 74d0790ab3b91d0a46db526f2599d6bf26172377 (patch) | |
| tree | 9dc783b84a8b677c5c7020e0e584964ff9995f83 /ShiftOS.Frontend/GraphicsSubsystem | |
| parent | c9b183a0e00720905a0da75a7d20770070a4f61d (diff) | |
| download | shiftos_thereturn-74d0790ab3b91d0a46db526f2599d6bf26172377.tar.gz shiftos_thereturn-74d0790ab3b91d0a46db526f2599d6bf26172377.tar.bz2 shiftos_thereturn-74d0790ab3b91d0a46db526f2599d6bf26172377.zip | |
skin loading and fullscreen toggle in options
Diffstat (limited to 'ShiftOS.Frontend/GraphicsSubsystem')
| -rw-r--r-- | ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs index 7bb534e..96ef3cb 100644 --- a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs +++ b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs @@ -18,6 +18,28 @@ namespace ShiftOS.Frontend.GraphicsSubsystem private static List<GUI.Control> topLevels = new List<GUI.Control>(); public static System.Drawing.Size Viewport { get; set; } public static GUI.Control FocusedControl = null; + private static ShiftOS _game = null; + + public static void Init(ShiftOS sentience) + { + _game = sentience; + } + + public static bool Fullscreen + { + get + { + return _game.graphicsDevice.IsFullScreen; + } + set + { + var uconf = Objects.UserConfig.Get(); + uconf.Fullscreen = value; + System.IO.File.WriteAllText("config.json", Newtonsoft.Json.JsonConvert.SerializeObject(uconf, Newtonsoft.Json.Formatting.Indented)); + _game.graphicsDevice.IsFullScreen = value; + _game.graphicsDevice.ApplyChanges(); + } + } public static void BringToFront(GUI.Control ctrl) { |
