aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GraphicsSubsystem
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Frontend/GraphicsSubsystem')
-rw-r--r--ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs22
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)
{