diff options
| author | RogueAI42 <[email protected]> | 2017-06-13 20:06:38 +1000 |
|---|---|---|
| committer | RogueAI42 <[email protected]> | 2017-06-13 20:06:38 +1000 |
| commit | 2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0 (patch) | |
| tree | 72954044f3dde5f9a17d12f99cd57a819f1b0f58 /ShiftOS.WinForms/MainMenu/MainMenu.cs | |
| parent | a2db5d39096cbf4d32412ad40168769ca63d9493 (diff) | |
| download | shiftos_thereturn-2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0.tar.gz shiftos_thereturn-2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0.tar.bz2 shiftos_thereturn-2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0.zip | |
Python API
It uses a meta-language and a CSharpCodeProvider on startup. I will
release a tutorial on the forums soon showing how to use it.
This commit also adds an extremely basic loading screen which shows
while Desktop is getting everything ready. Which can take a while
if you have any Python mods. Thanks, IronPython.
Diffstat (limited to 'ShiftOS.WinForms/MainMenu/MainMenu.cs')
| -rw-r--r-- | ShiftOS.WinForms/MainMenu/MainMenu.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ShiftOS.WinForms/MainMenu/MainMenu.cs b/ShiftOS.WinForms/MainMenu/MainMenu.cs index e11edc2..1936fec 100644 --- a/ShiftOS.WinForms/MainMenu/MainMenu.cs +++ b/ShiftOS.WinForms/MainMenu/MainMenu.cs @@ -15,6 +15,11 @@ namespace ShiftOS.WinForms.MainMenu { public partial class MainMenu : Form { + private void StartGame() + { + new Loading().Show(); + } + public MainMenu(IDesktop desk) { InitializeComponent(); @@ -163,7 +168,7 @@ namespace ShiftOS.WinForms.MainMenu private void button2_Click(object sender, EventArgs e) { (Desktop.CurrentDesktop as WinformsDesktop).IsSandbox = true; - Desktop.CurrentDesktop.Show(); + StartGame(); } private void button3_Click(object sender, EventArgs e) @@ -239,7 +244,7 @@ namespace ShiftOS.WinForms.MainMenu private void btncontinue_Click(object sender, EventArgs e) { - Desktop.CurrentDesktop.Show(); + StartGame(); } @@ -253,13 +258,13 @@ namespace ShiftOS.WinForms.MainMenu if (result == true) { System.IO.File.Delete(path); - Desktop.CurrentDesktop.Show(); + StartGame(); } }); } else { - Desktop.CurrentDesktop.Show(); + StartGame(); } } } |
