aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main/ShiftOS
diff options
context:
space:
mode:
authorFloppyDiskDrive <[email protected]>2017-11-23 11:20:53 -0600
committerFloppyDiskDrive <[email protected]>2017-11-23 11:20:53 -0600
commit8fff93eb7da1b01d101e146ca7fe5d90ca01fcde (patch)
treeebb8eafff81f5e54925ec27f1a19b5066f83a418 /ShiftOS.Main/ShiftOS
parent1febbbd405e6f67401313defb76cc5a41b44c912 (diff)
downloadshiftos-rewind-8fff93eb7da1b01d101e146ca7fe5d90ca01fcde.tar.gz
shiftos-rewind-8fff93eb7da1b01d101e146ca7fe5d90ca01fcde.tar.bz2
shiftos-rewind-8fff93eb7da1b01d101e146ca7fe5d90ca01fcde.zip
extremely rough savesystem
Diffstat (limited to 'ShiftOS.Main/ShiftOS')
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/Terminal.cs7
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.cs15
2 files changed, 17 insertions, 5 deletions
diff --git a/ShiftOS.Main/ShiftOS/Apps/Terminal.cs b/ShiftOS.Main/ShiftOS/Apps/Terminal.cs
index c4bfe83..bd53ab7 100644
--- a/ShiftOS.Main/ShiftOS/Apps/Terminal.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/Terminal.cs
@@ -4,6 +4,7 @@ using ShiftOS.Engine;
using ShiftOS.Main.Terminal;
using System.Linq;
using System.Collections.Generic;
+using System.Drawing.Text;
namespace ShiftOS.Main.ShiftOS.Apps
{
@@ -17,6 +18,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
public bool WaitingResponse = false;
public string InputReturnText = "";
public Stack<string> c = TerminalBackend.commandBuffer;
+ private PrivateFontCollection fontCollection = new PrivateFontCollection();
// The below variables makes the terminal... a terminal!
string OldText = "";
@@ -30,6 +32,11 @@ namespace ShiftOS.Main.ShiftOS.Apps
termmain.ContextMenuStrip = new ContextMenuStrip(); // Disables the right click of a richtextbox!
TerminalBackend.trm.Add(this);
+
+ fontCollection.AddFontFile(SaveSystem.fontDir + "\\termFont.ttf");
+
+ termmain.Font = new System.Drawing.Font(fontCollection.Families[0], 12F, System.Drawing.FontStyle.Regular);
+
}
void Print()
diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/ShiftOS/Desktop.cs
index 28e3a38..7d1a052 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.cs
@@ -1,22 +1,21 @@
using System;
-using System.Linq;
using System.Windows.Forms;
-using ShiftOS.Engine.Misc;
using ShiftOS.Engine.WindowManager;
using ShiftOS.Main.Properties;
using ShiftOS.Main.ShiftOS.Apps;
-using System.Drawing;
+using System.IO;
+using ShiftOS.Engine;
namespace ShiftOS.Main.ShiftOS
{
// testing github because git hates me
- public partial class Desktop : Form
+ public partial class Desktop : Form
{
public Desktop()
{
InitializeComponent();
timer1.Start();
-
+ Setup();
Closed += (sender, args) => { Application.Exit(); };
}
@@ -54,5 +53,11 @@ namespace ShiftOS.Main.ShiftOS
{
lblClock.Text = DateTime.Now.ToString("hh:mm:ss");
}
+ public void Setup()
+ {
+ if (!Directory.Exists(SaveSystem.gameDir)) Directory.CreateDirectory(SaveSystem.gameDir);
+ if (!Directory.Exists(SaveSystem.fontDir)) Directory.CreateDirectory(SaveSystem.fontDir);
+ if (!File.Exists(SaveSystem.fontDir + "\\termFont.ttf")) File.WriteAllBytes(SaveSystem.fontDir + "\\termFont.ttf", Resources.UbuntuMono_R);
+ }
}
}