diff options
| author | EverythingWindows <[email protected]> | 2022-11-21 10:43:53 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-21 10:43:53 +0700 |
| commit | c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d (patch) | |
| tree | d8163ca4462d33f061335973d19be2ddabbc0c8c /ShiftOS-TheRevival/API/TerminalAPI.vb | |
| parent | 3f4edf1b79ee4ee5a73251930af641bcd0db225e (diff) | |
| download | shiftos-therevival-old-c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d.tar.gz shiftos-therevival-old-c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d.tar.bz2 shiftos-therevival-old-c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d.zip | |
Dual Window Manager development
Diffstat (limited to 'ShiftOS-TheRevival/API/TerminalAPI.vb')
| -rw-r--r-- | ShiftOS-TheRevival/API/TerminalAPI.vb | 54 |
1 files changed, 34 insertions, 20 deletions
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() |
