aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/ShiftOS.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-03 11:29:54 -0400
committerMichael <[email protected]>2017-07-03 11:29:54 -0400
commitbe6cd3a0c02168b998e58b77a4d08a4b7cb8cfe3 (patch)
tree3d732005a4807f3057ce6f9de1bb68518bbfe043 /ShiftOS.Frontend/ShiftOS.cs
parent68362b4c6fe2e740ac02f7b4cb1ae77de3cfbd09 (diff)
downloadshiftos_thereturn-be6cd3a0c02168b998e58b77a4d08a4b7cb8cfe3.tar.gz
shiftos_thereturn-be6cd3a0c02168b998e58b77a4d08a4b7cb8cfe3.tar.bz2
shiftos_thereturn-be6cd3a0c02168b998e58b77a4d08a4b7cb8cfe3.zip
text input stuff
Diffstat (limited to 'ShiftOS.Frontend/ShiftOS.cs')
-rw-r--r--ShiftOS.Frontend/ShiftOS.cs75
1 files changed, 57 insertions, 18 deletions
diff --git a/ShiftOS.Frontend/ShiftOS.cs b/ShiftOS.Frontend/ShiftOS.cs
index 396132c..6bfa4dc 100644
--- a/ShiftOS.Frontend/ShiftOS.cs
+++ b/ShiftOS.Frontend/ShiftOS.cs
@@ -65,24 +65,63 @@ namespace ShiftOS.Frontend
//Let's give it a try.
Engine.Infobox.Show("Welcome to ShiftOS!", "This is a test infobox. Clicking OK will dismiss it.");
- //Let's set up the Main Menu UI.
-
- var justthes = new GUI.PictureBox();
- justthes.AutoSize = true;
- justthes.ImageLayout = GUI.ImageLayout.Stretch;
- justthes.Image = Properties.Resources.justthes;
- justthes.X = 15;
- justthes.Y = 15;
- justthes.Opacity = 0.5;
- UIManager.AddTopLevel(justthes);
-
- _titleLabel = new GUI.TextControl();
- _titleLabel.Text = " - main menu - ";
- _titleLabel.AutoSize = true;
- _titleLabel.X = justthes.X;
- _titleLabel.Y = justthes.Y + justthes.Height + 15;
- _titleLabel.Font = SkinEngine.LoadedSkin.HeaderFont;
- UIManager.AddTopLevel(_titleLabel);
+ //Let's initiate the engine just for a ha.
+
+ //We'll create a few UI elements when the save system loads
+ SaveSystem.GameReady += () =>
+ {
+ var headerLabel = new GUI.TextControl();
+ headerLabel.Font = SkinEngine.LoadedSkin.HeaderFont;
+ headerLabel.AutoSize = true;
+ headerLabel.Text = "ShiftOS engine startup stats";
+ headerLabel.X = 30;
+ headerLabel.Y = 30;
+ UIManager.AddTopLevel(headerLabel);
+
+ var statslabel = new GUI.TextControl();
+ statslabel.AutoSize = true;
+ statslabel.X = 30;
+ statslabel.Y = headerLabel.Y + headerLabel.Height + 30;
+ UIManager.AddTopLevel(statslabel);
+ statslabel.Text = $@"Save System
+=======================
+
+System name: {SaveSystem.CurrentSave.SystemName}
+Users: {SaveSystem.CurrentSave.Users.Count}
+
+Current user: {SaveSystem.CurrentUser.Username}
+
+Sandbox mode: {SaveSystem.IsSandbox}
+Installed upgrades: {SaveSystem.CurrentSave.CountUpgrades()} - may be inaccurate if in sandbox mode
+Available upgrades: {Shiftorium.GetAvailable().Count()}
+Total upgrades: {Shiftorium.GetDefaults().Count()}
+
+ShiftFS
+============================
+
+Mounted file systems: {Objects.ShiftFS.Utils.Mounts.Count}
+
+Reflection Manager
+=====================
+
+Reflection manager found {ReflectMan.Types.Count()} Common Language Runtime types that ShiftOS can reflect over.
+
+
+";
+ statslabel.Layout();
+ };
+
+ //We'll use sandbox mode
+ SaveSystem.IsSandbox = true;
+
+ SaveSystem.Begin();
+
+ var textinput = new GUI.TextInput();
+ textinput.Width = 250;
+ textinput.Height = 20;
+ textinput.X = 0;
+ textinput.Y = 0;
+ UIManager.AddTopLevel(textinput);
base.Initialize();