aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/ShiftOS.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-04 09:52:49 -0400
committerMichael <[email protected]>2017-07-04 09:52:49 -0400
commit3e65bf26fd69ed5cd9ed9c49b20ab5182c098430 (patch)
tree4f3b0d26fba385bf6080db01ccfaa9bc73345276 /ShiftOS.Frontend/ShiftOS.cs
parentd23c5cc29dc47537d1cf6069f27009750fd80919 (diff)
downloadshiftos_thereturn-3e65bf26fd69ed5cd9ed9c49b20ab5182c098430.tar.gz
shiftos_thereturn-3e65bf26fd69ed5cd9ed9c49b20ab5182c098430.tar.bz2
shiftos_thereturn-3e65bf26fd69ed5cd9ed9c49b20ab5182c098430.zip
Port over the Terminal
Diffstat (limited to 'ShiftOS.Frontend/ShiftOS.cs')
-rw-r--r--ShiftOS.Frontend/ShiftOS.cs64
1 files changed, 5 insertions, 59 deletions
diff --git a/ShiftOS.Frontend/ShiftOS.cs b/ShiftOS.Frontend/ShiftOS.cs
index fd3d784..9d7d503 100644
--- a/ShiftOS.Frontend/ShiftOS.cs
+++ b/ShiftOS.Frontend/ShiftOS.cs
@@ -22,6 +22,10 @@ namespace ShiftOS.Frontend
GraphicsDevice = new GraphicsDeviceManager(this);
GraphicsDevice.PreferredBackBufferHeight = 1080;
GraphicsDevice.PreferredBackBufferWidth = 1920;
+ UIManager.Viewport = new System.Drawing.Size(
+ GraphicsDevice.PreferredBackBufferWidth,
+ GraphicsDevice.PreferredBackBufferHeight
+ );
Content.RootDirectory = "Content";
@@ -64,55 +68,8 @@ namespace ShiftOS.Frontend
Engine.Infobox.Init(new Infobox());
- //Let's give it a try.
- Engine.Infobox.Show("Welcome to ShiftOS!", "This is a test infobox. Clicking OK will dismiss it.");
-
//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();
- };
-
+
TerminalBackend.TerminalRequested += () =>
{
AppearanceManager.SetupWindow(new Apps.Terminal());
@@ -123,17 +80,6 @@ Reflection manager found {ReflectMan.Types.Count()} Common Language Runtime type
SaveSystem.Begin(true);
- var textinput = new GUI.TextInput();
- textinput.Width = 250;
- textinput.Height = 20;
- textinput.X = 0;
- textinput.Y = 0;
- UIManager.AddTopLevel(textinput);
-
- framerate.Width = GraphicsDevice.PreferredBackBufferWidth;
- framerate.Height = GraphicsDevice.PreferredBackBufferHeight;
- framerate.TextAlign = GUI.TextAlign.BottomRight;
-
base.Initialize();
}