From c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Mon, 21 Nov 2022 10:43:53 +0700 Subject: Dual Window Manager development --- ShiftOS-TheRevival/API/TerminalAPI.vb | 54 ++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 20 deletions(-) (limited to 'ShiftOS-TheRevival/API/TerminalAPI.vb') diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb index 1af775e..5ba8923 100644 --- a/ShiftOS-TheRevival/API/TerminalAPI.vb +++ b/ShiftOS-TheRevival/API/TerminalAPI.vb @@ -4,36 +4,46 @@ Module TerminalAPI Public command As String Public AdvancedCommand As Boolean Public RawCommand As String + Public IsConsoleParent As Boolean = True Public Sub InitializeTerminal() - Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS" - Strings.OnceInfo(4) = "!" - Strings.OnceInfo(7) = Console.Width - Strings.OnceInfo(8) = Console.Height - If Strings.IsFree = True Then - Strings.ComputerInfo(0) = "shiftos" - Strings.ComputerInfo(1) = "user" - Terminal_CheckFeature() - Terminal_PrintPrompt() - Terminal_AssignPrompt() - Else - If Console.StayAtChapter = True Then - LoadGame() + If IsConsoleParent = True Then + Cursor.Hide() + Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS" + Strings.OnceInfo(4) = "!" + Strings.OnceInfo(7) = Console.Width + Strings.OnceInfo(8) = Console.Height + If Strings.IsFree = True Then + Strings.ComputerInfo(0) = "shiftos" + Strings.ComputerInfo(1) = "user" Terminal_CheckFeature() Terminal_PrintPrompt() Terminal_AssignPrompt() Else - If Strings.ComputerInfo(3) = "0" Then - Console.TextBox1.ReadOnly = True - Console.StayAtChapter = True - Console.StoryOnlyTimer.Start() - Else + If Console.StayAtChapter = True Then LoadGame() Terminal_CheckFeature() Terminal_PrintPrompt() Terminal_AssignPrompt() + Else + If Strings.ComputerInfo(3) = "0" Then + Console.TextBox1.ReadOnly = True + Console.StayAtChapter = True + Console.StoryOnlyTimer.Start() + Else + LoadGame() + Terminal_CheckFeature() + Terminal_PrintPrompt() + Terminal_AssignPrompt() + End If End If End If + Else + Cursor.Show() + Console_Windowed() + Console.TopMost = True + Terminal_PrintPrompt() + Terminal_AssignPrompt() End If Console.CurrentDirectory = Strings.OnceInfo(1) Console.Pseudodir = Console.CurrentDirectory.Replace(Strings.OnceInfo(1), "!\") @@ -179,6 +189,10 @@ Module TerminalAPI AdvancedCommand = False NormalCommand() End If + Case "close" + If IsConsoleParent = False Then + Console.Close() + End If Case "codepoint" Codepoint() AdvancedCommand = False @@ -265,10 +279,10 @@ Module TerminalAPI Case "startx" Undeveloped() StartX() - Console_Windowed() - DuWM_FirstWindowSet(Console) Case "shiftertest" DuWM_SecondWindowSet(Shifter) + Console.Close() + DuWM_FirstWindowSet(Console) Case "stopx" StopX() Undeveloped() -- cgit v1.2.3