aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/MainMenu.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-27 12:03:55 -0400
committerMichael <[email protected]>2017-07-27 12:03:55 -0400
commit89dfed83afbb8272388940cd0b4b46b8b066153f (patch)
tree79e9e22d4c8a5d8274db55ed1c54dc17d58c5db5 /ShiftOS.Frontend/MainMenu.cs
parentcac4e1f9a7af1c92e4bd61a42fb48359df6eeaec (diff)
downloadshiftos_thereturn-89dfed83afbb8272388940cd0b4b46b8b066153f.tar.gz
shiftos_thereturn-89dfed83afbb8272388940cd0b4b46b8b066153f.tar.bz2
shiftos_thereturn-89dfed83afbb8272388940cd0b4b46b8b066153f.zip
Hacking UI is coming in.
Diffstat (limited to 'ShiftOS.Frontend/MainMenu.cs')
-rw-r--r--ShiftOS.Frontend/MainMenu.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/ShiftOS.Frontend/MainMenu.cs b/ShiftOS.Frontend/MainMenu.cs
index 12fb033..a6d987f 100644
--- a/ShiftOS.Frontend/MainMenu.cs
+++ b/ShiftOS.Frontend/MainMenu.cs
@@ -23,6 +23,8 @@ namespace ShiftOS.Frontend
private TextControl _resDisplay = new TextControl();
private Button _optionsSave = new Button();
private CheckBox _fullscreen = new CheckBox();
+ private Button _close = new Button();
+
public MainMenu()
{
@@ -170,6 +172,7 @@ namespace ShiftOS.Frontend
SaveOptions();
_menuTitle.Text = "Main Menu";
_campaign.Visible = true;
+ _close.Visible = true;
_sandbox.Visible = true;
_options.Visible = true;
}
@@ -182,6 +185,19 @@ namespace ShiftOS.Frontend
_resIndex = _screenResolutions.Count - 1;
}
_fullscreen.Y = _sandbox.Y;
+
+ _close.X = 30;
+ _close.Font = _campaign.Font;
+ _close.Y = _options.Y + _options.Font.Height + 15;
+ _close.Text = "Close";
+ _close.Height = _campaign.Height;
+ _close.Width = _campaign.Width;
+ AddControl(_close);
+ _close.Click += () =>
+ {
+ SaveSystem.IsSandbox = true;
+ ShiftOSCommands.Shutdown();
+ };
}
public void SaveOptions()
@@ -199,6 +215,7 @@ namespace ShiftOS.Frontend
_campaign.Visible = false;
_sandbox.Visible = false;
_options.Visible = false;
+ _close.Visible = false;
var res = _screenResolutions[_resIndex];
_resDisplay.Text = $"{res.Width}x{res.Height}";