diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb
index a5fdffe..912f782 100644
--- a/ShiftOS-TheRevival/API/TerminalAPI.vb
+++ b/ShiftOS-TheRevival/API/TerminalAPI.vb
@@ -3,6 +3,82 @@
Public AdvancedCommand As Boolean
Public RawCommand As String
+ 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()
+ 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
+ Console.CurrentDirectory = Strings.OnceInfo(1)
+ Console.Pseudodir = Console.CurrentDirectory.Replace(Strings.OnceInfo(1), "!\")
+ Console.CurrentInterpreter = "terminal"
+ TextRebind()
+ End Sub
+
+ Public Sub Terminal_CheckFeature()
+ If Strings.AvailableFeature(4) = "1" Then
+ If Console.ToolBarUse = True Then
+ If Strings.OnceInfo(2) = "True" Then
+ Console.InfoBarTimer.Start()
+ Console.TextBox1.Dock = DockStyle.None
+ Console.ToolBar.Visible = True
+ Console.ToolBar.SendToBack()
+ Console.InfoBar.Visible = True
+ Console.InfoBar.SendToBack()
+ Console.TextBox1.Dock = DockStyle.Fill
+ Else
+ Console.TextBox1.Dock = DockStyle.None
+ Console.InfoBar.Visible = False
+ Console.ToolBar.Visible = True
+ Console.ToolBar.SendToBack()
+ Console.TextBox1.Dock = DockStyle.Fill
+ End If
+ Else
+ If Strings.OnceInfo(2) = "True" Then
+ Console.InfoBarTimer.Start()
+ Console.TextBox1.Dock = DockStyle.None
+ Console.InfoBar.Visible = True
+ Console.InfoBar.SendToBack()
+ Console.ToolBar.Visible = False
+ Console.TextBox1.Dock = DockStyle.Fill
+ Else
+ Console.TextBox1.Dock = DockStyle.None
+ Console.InfoBar.Visible = False
+ Console.ToolBar.Visible = False
+ Console.TextBox1.Dock = DockStyle.Fill
+ End If
+ End If
+ Else
+ Console.TextBox1.Dock = DockStyle.None
+ Console.InfoBar.Visible = False
+ Console.TextBox1.Dock = DockStyle.Fill
+ End If
+ End Sub
+
Public Sub Terminal_ExecuteInput()
Terminal_ReadCommand()
If Strings.AvailableFeature(18) = 1 Then
@@ -152,7 +228,7 @@
AdvancedCommand = False
NormalCommand()
SaveGame()
- Console.InitializeTerminal()
+ InitializeTerminal()
Case "shiftorium"
NewLine(My.Resources.man_shiftorium)
AdvancedCommand = False
diff --git a/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb b/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb
index 048b61f..61381de 100644
--- a/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb
+++ b/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb
@@ -31,7 +31,7 @@
Console.TextBox1.ReadOnly = False
Strings.ComputerInfo(0) = "shiftos"
Strings.ComputerInfo(1) = "user"
- Console.CheckFeature()
+ Terminal_CheckFeature()
Terminal_PrintPrompt()
Terminal_AssignPrompt()
TextRebind()
diff --git a/ShiftOS-TheRevival/MainForms/Console.Designer.vb b/ShiftOS-TheRevival/MainForms/Console.Designer.vb
index 3e07714..3d73ced 100644
--- a/ShiftOS-TheRevival/MainForms/Console.Designer.vb
+++ b/ShiftOS-TheRevival/MainForms/Console.Designer.vb
@@ -28,6 +28,7 @@ Partial Class Console
Me.InfoBar = New System.Windows.Forms.TextBox()
Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components)
Me.ToolBar = New System.Windows.Forms.TextBox()
+ Me.ShortcutHandler = New System.ComponentModel.BackgroundWorker()
Me.SuspendLayout()
'
'TextBox1
@@ -102,4 +103,5 @@ Partial Class Console
Friend WithEvents InfoBar As TextBox
Friend WithEvents InfoBarTimer As Timer
Friend WithEvents ToolBar As TextBox
+ Friend WithEvents ShortcutHandler As System.ComponentModel.BackgroundWorker
End Class
diff --git a/ShiftOS-TheRevival/MainForms/Console.resx b/ShiftOS-TheRevival/MainForms/Console.resx
index 4224eae..38ebc49 100644
--- a/ShiftOS-TheRevival/MainForms/Console.resx
+++ b/ShiftOS-TheRevival/MainForms/Console.resx
@@ -123,4 +123,7 @@
153, 17
+
+ 274, 17
+
\ No newline at end of file
diff --git a/ShiftOS-TheRevival/MainForms/Console.vb b/ShiftOS-TheRevival/MainForms/Console.vb
index 5dca6dc..41d17fb 100644
--- a/ShiftOS-TheRevival/MainForms/Console.vb
+++ b/ShiftOS-TheRevival/MainForms/Console.vb
@@ -7,7 +7,7 @@ Public Class Console
Public DisplayStory As Integer 'Keep record for displaying the DevX's or other's monologue
Public StoryToTell As String 'Which chapter that you're going to be in
Public ChangeInterpreter As Boolean = False 'Default interpreter is Terminal, if it's changed to True, there'll be other program used by Console
- Public CurrentInterpreter As String = "terminal" 'Shows what program is using Console
+ Public CurrentInterpreter As String 'Shows what program is using Console
Public CurrentDirectory As String 'Current Directory for ShiftOS Explorer
Public Pseudodir As String 'Pseudo-directory for ShiftFS
Public StayAtChapter As Boolean = False 'If this set to true, then intro for chapters are mostly going to be in
@@ -21,81 +21,6 @@ Public Class Console
InitializeTerminal()
End Sub
- Public Sub InitializeTerminal()
- Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
- Strings.OnceInfo(4) = "!"
- Strings.OnceInfo(7) = Width
- Strings.OnceInfo(8) = Height
- If Strings.IsFree = True Then
- Strings.ComputerInfo(0) = "shiftos"
- Strings.ComputerInfo(1) = "user"
- CheckFeature()
- Terminal_PrintPrompt()
- Terminal_AssignPrompt()
- Else
- If StayAtChapter = True Then
- LoadGame()
- CheckFeature()
- Terminal_PrintPrompt()
- Terminal_AssignPrompt()
- Else
- If Strings.ComputerInfo(3) = "0" Then
- TextBox1.ReadOnly = True
- StayAtChapter = True
- StoryOnlyTimer.Start()
- Else
- LoadGame()
- CheckFeature()
- Terminal_PrintPrompt()
- Terminal_AssignPrompt()
- End If
- End If
- End If
- CurrentDirectory = Strings.OnceInfo(1)
- Pseudodir = CurrentDirectory.Replace(Strings.OnceInfo(1), "!\")
- TextRebind()
- End Sub
-
- Public Sub CheckFeature()
- If Strings.AvailableFeature(4) = "1" Then
- If ToolBarUse = True Then
- If Strings.OnceInfo(2) = "True" Then
- InfoBarTimer.Start()
- TextBox1.Dock = DockStyle.None
- ToolBar.Visible = True
- ToolBar.SendToBack()
- InfoBar.Visible = True
- InfoBar.SendToBack()
- TextBox1.Dock = DockStyle.Fill
- Else
- TextBox1.Dock = DockStyle.None
- InfoBar.Visible = False
- ToolBar.Visible = True
- ToolBar.SendToBack()
- TextBox1.Dock = DockStyle.Fill
- End If
- Else
- If Strings.OnceInfo(2) = "True" Then
- InfoBarTimer.Start()
- TextBox1.Dock = DockStyle.None
- InfoBar.Visible = True
- InfoBar.SendToBack()
- ToolBar.Visible = False
- TextBox1.Dock = DockStyle.Fill
- Else
- TextBox1.Dock = DockStyle.None
- InfoBar.Visible = False
- ToolBar.Visible = False
- TextBox1.Dock = DockStyle.Fill
- End If
- End If
- Else
- TextBox1.Dock = DockStyle.None
- InfoBar.Visible = False
- TextBox1.Dock = DockStyle.Fill
- End If
- End Sub
-
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
KeyInput = e.KeyData
InputKey = e.KeyData
diff --git a/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb b/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb
index b3ef9d5..4777fd1 100644
--- a/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb
+++ b/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb
@@ -56,7 +56,7 @@ Module TerminalExternalApps
Console.DefaultPrompt = Nothing
Console.TextBox1.Text = Nothing
Console.ToolBarUse = True
- Console.CheckFeature()
+ Terminal_CheckFeature()
Console.CurrentInterpreter = "textpad"
TextPad_CheckExist(command)
Console.ToolBar.Text = "TextPad - " & command & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As"
@@ -98,7 +98,7 @@ Module TerminalExternalApps
Console.ChangeInterpreter = False
Console.ReleaseCursor = False
Console.CurrentInterpreter = "terminal"
- Console.CheckFeature()
+ Terminal_CheckFeature()
Terminal_AssignPrompt()
Terminal_PrintPrompt()
TextRebind()
@@ -107,7 +107,7 @@ Module TerminalExternalApps
Console.ChangeInterpreter = False
Console.ReleaseCursor = False
Console.CurrentInterpreter = "terminal"
- Console.CheckFeature()
+ Terminal_CheckFeature()
Terminal_AssignPrompt()
Terminal_PrintPrompt()
TextRebind()
diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb
index 286e544..1bf1224 100644
--- a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb
+++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb
@@ -6,12 +6,12 @@
Select Case infobarcommand
Case "on"
Strings.OnceInfo(2) = "True"
- Console.CheckFeature()
+ Terminal_CheckFeature()
NormalCommand()
advancedtool = False
Case "off"
Strings.OnceInfo(2) = "False"
- Console.CheckFeature()
+ Terminal_CheckFeature()
NormalCommand()
advancedtool = False
End Select