diff options
| author | TheUltimateHacker <[email protected]> | 2015-05-23 10:21:24 -0400 |
|---|---|---|
| committer | TheUltimateHacker <[email protected]> | 2015-05-23 10:21:24 -0400 |
| commit | 57e6eec1bc00eaedeb6004c225184ba03f1155e0 (patch) | |
| tree | 9f4a55082f6715f6b9515867a392c4be1a6366ef /shiftos_next/API.vb | |
| parent | 02df35aba0fc3b92fdd72eca5a35c6744e993951 (diff) | |
| download | shiftos-next-57e6eec1bc00eaedeb6004c225184ba03f1155e0.tar.gz shiftos-next-57e6eec1bc00eaedeb6004c225184ba03f1155e0.tar.bz2 shiftos-next-57e6eec1bc00eaedeb6004c225184ba03f1155e0.zip | |
Basic Window Manager implemented0.0.1
WARNING: Due to a bug that made the save engine think it was ShiftOS
0.0.8, I had to change the actualshiftversion variable to prevent older
ShiftOS versions opening the save file thus crashing. Due to this,
ShiftOS-Next will automatically delete C:\ShiftOS and rewrite the save.
Besides that, I've added a new Window Manager that can be bought after
buying Gray, Basic GUI Server, File Skimmer, and Textpad. This window
manager allows you to run multiple apps at once in their own window, as
well as having up to 3 Terminals running at once. It is a
work-in-progress feature, but it's currently stable.
Diffstat (limited to 'shiftos_next/API.vb')
| -rw-r--r-- | shiftos_next/API.vb | 113 |
1 files changed, 112 insertions, 1 deletions
diff --git a/shiftos_next/API.vb b/shiftos_next/API.vb index 16cb502..0b37667 100644 --- a/shiftos_next/API.vb +++ b/shiftos_next/API.vb @@ -1,7 +1,117 @@ Module API 'Terminal - Public txtterm As TextBox = Terminal.txtterm + Public txtterm As TextBox = Terminal.terminaltext + + Public Function SetColorbasic(colorname As String) + Dim element As Color + Select Case colorname + Case "black" + AddLine("Error! Black and black don't go too well...") + Case "white" + element = Color.White + Case "gray" + If boughtgray Then + element = Color.Gray + Else + AddLine("Error! Unsupported color.") + End If + Case "red" + If boughtred Then + element = Color.Red + Else + AddLine("Error! Unsupported color.") + End If + Case "green" + If boughtgreen Then + element = Color.Green + Else + AddLine("Error! Unsupported color.") + End If + Case "blue" + If boughtblue Then + element = Color.Blue + Else + AddLine("Error! Unsupported color.") + End If + Case "yellow" + If boughtyellow Then + element = Color.Yellow + Else + AddLine("Error! Unsupported color.") + End If + Case "orange" + If boughtorange Then + element = Color.Orange + Else + AddLine("Error! Unsupported color.") + End If + Case "pink" + If boughtpink Then + element = Color.Pink + Else + AddLine("Error! Unsupported color.") + End If + Case "purple" + If boughtpurple Then + element = Color.Purple + Else + AddLine("Error! Unsupported color.") + End If + Case "brown" + If boughtbrown Then + element = Color.Brown + Else + AddLine("Error! Unsupported color.") + End If + Case Else + AddLine("Error! Unsupported color, check 'colors' for a list of supported colors.") + End Select + Return element + End Function + + Public Sub OpenProgram(progtoopen As String) + Select Case progtoopen + Case "shiftorium", "packages", "pacman", "code shop" + shiftorium_cmd.Show() + Case "files", "fileskimmer", "file skimmer", "fs", "file browser" + If boughtfileskimmer = True Then + file_skimmer.Show() + Else + AddLine("open: Invalid program """ & progtoopen & """.") + End If + Case "textpad", "text", "notepad" + If boughttextpad = True Then + TextPad.Show() + Else + AddLine("open: Invalid program """ & progtoopen & """.") + End If + Case Else + AddLine("open: Invalid program """ & progtoopen & """.") + End Select + End Sub + + Public Sub closeprogram(progtoclose As String) + Select Case progtoclose + Case "shiftorium", "packages", "pacman", "code shop" + shiftorium_cmd.Hide() + Case "files", "fileskimmer", "file skimmer", "fs", "file browser" + If boughtfileskimmer = True Then + file_skimmer.Hide() + Else + AddLine("close: Invalid program """ & progtoclose & """.") + End If + Case "textpad", "text", "notepad" + If boughttextpad = True Then + TextPad.Hide() + Else + AddLine("close: Invalid program """ & progtoclose & """.") + End If + + Case Else + AddLine("close: Invalid program """ & progtoclose & """.") + End Select + End Sub Public Sub wrongcommand() AddLine("Invalid command! Type ""help"" for a list of commands.") @@ -89,6 +199,7 @@ Public Sub SelectBottom() txtterm.Select(txtterm.Text.Length, 0) + txtterm.ScrollToCaret() End Sub End Module |
