mirror of
https://github.com/TheUltimateHacker/shiftos-next.git
synced 2025-01-22 00:51:55 -05:00
Shiftorium - Draggable Windows upgrade + Bugfixes
Alright, I've added the Draggable Windows upgrade to the Shiftorium, as well as fixed a quick bug causing "No Items Available" to display when there were items clearly available. I've also fixed a positioning bug with BWM windows causing them to start in the center of the screen, relative to the titlebar, rather than the form. I've also re-arranged the code a bit, organizing files in folders. APIs are in the APIs folder, Desktop Environments are in the Desktop Environments folder, etc. The shiftorium still doesn't have draggable window functionality yet...
This commit is contained in:
parent
6c5f8c6381
commit
424931951b
41 changed files with 52 additions and 37 deletions
Binary file not shown.
|
@ -1,6 +1,7 @@
|
|||
Module API
|
||||
'Terminal
|
||||
|
||||
Public debugmode As Boolean = False 'If this boolean value is set to True, any exceptions will be shown, rather than supressed.
|
||||
Public txtterm As TextBox = Terminal.terminaltext
|
||||
|
||||
Public Function SetColorbasic(colorname As String)
|
|
@ -11,6 +11,11 @@
|
|||
|
||||
Friend WithEvents prnt As Form = ParentForm
|
||||
|
||||
Private Sub Titlebar_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Me.Dock = DockStyle.Top
|
||||
Me.BringToFront()
|
||||
End Sub
|
||||
|
||||
Private Sub titlebar_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown, lbtitle.MouseDown
|
||||
' Handle Draggable Windows
|
||||
If boughtdraggablewindows = True Then
|
||||
|
@ -31,8 +36,8 @@
|
|||
If boughtbasicwm = True Then
|
||||
Me.Show()
|
||||
ParentForm.WindowState = FormWindowState.Normal
|
||||
ParentForm.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
|
||||
ParentForm.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
|
||||
ParentForm.Left = (Screen.PrimaryScreen.Bounds.Width - ParentForm.Width) / 2
|
||||
ParentForm.Top = (Screen.PrimaryScreen.Bounds.Height - ParentForm.Height) / 2
|
||||
ParentForm.TopMost = True
|
||||
Else
|
||||
Me.Hide()
|
||||
|
|
|
@ -52,7 +52,9 @@
|
|||
If boughtbasicwm = False Then
|
||||
AddItem("Basic Window Manager", 100)
|
||||
Else
|
||||
'Placeholder
|
||||
If boughtdraggablewindows = False Then
|
||||
AddItem("BWM Draggable Windows", 25)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -67,9 +69,13 @@
|
|||
AddItem("Set Terminal Text Color", 10)
|
||||
End If
|
||||
End If
|
||||
lbitems.SelectedIndex = 1
|
||||
lbitems.SelectedIndex = 0
|
||||
Catch ex As Exception
|
||||
lbitems.Items.Add("No items available.")
|
||||
If debugmode = False Then
|
||||
lbitems.Items.Add("No items available.")
|
||||
Else
|
||||
lbitems.Items.Add(ex.Message)
|
||||
End If
|
||||
End Try
|
||||
lbitems.DrawMode = DrawMode.OwnerDrawFixed
|
||||
End Sub
|
||||
|
@ -91,6 +97,7 @@
|
|||
lbitems.SelectedIndex -= 1
|
||||
End If
|
||||
Case Keys.Enter
|
||||
handleitemdescription("BWM Draggable Windows - 25 CP", "We are able to have multiple windows on the screen, but they all stick to the center of the screen and can't be moved! This upgrade fixes that.")
|
||||
handleitemdescription("Basic Window Manager - 100 CP", "Fullscreen applications, well, suck. You can't get any work done outside of that app without closing it, and can't even view the Terminal. This upgrade changes that. We've found a way to use the Basic GUI server to create a simple window manager. It allows multiple windows on the screen, and up to 3 Terminal windows at once.")
|
||||
handleitemdescription("Textpad - 50 CP", "Hmmmmm... What was I gonna do on Sunday? Oh yeah! I have to get that website written for my buddy. Better write that down before I forget... " & vbNewLine & vbNewLine & "Textpad allows you to create text documents. Handy if you need to write something down!")
|
||||
handleitemdescription("FS Delete - 15 CP", "Alright, What's this unused document doing on my PC? I don't need this. I must delete it. With this upgrade, you can delete files in the File Skimmer.")
|
||||
|
@ -103,6 +110,7 @@
|
|||
handleitemdescription("Custom Username - 10 CP", "Hello, user! Isn't that wierd that that's all we know you as? Buy this upgrade to change yourr name from ""user"" to anything you want!")
|
||||
handleitemdescription("Basic Terminal Settings - 5 CP", "Ever wanted to customize the terminal to act the way you'd like it to? This upgrade is for you. You won't be able to use it until you buy settings, but hey! The command is there.")
|
||||
Case Keys.Space
|
||||
handlebuy("BWM Draggable Windows - 25 CP", boughtdraggablewindows, "The upgrade has been applied, and now we can drag windows around using our mouse!")
|
||||
handlebuy("Basic Window Manager - 100 CP", boughtbasicwm, "Awesome! Just exit the Shiftorium and type ""bwm"" into the Terminal, and away we go. Future sessions will not require typing ""bwm"".")
|
||||
handlebuy("Textpad - 50 CP", boughttextpad, "Great. Now our computer is a bit more useful than before...")
|
||||
handlebuy("FS Delete - 15 CP", boughtfileskimmerdelete, "There. I can finally destroy that evil document that's been taking up 3/4 of my hard drive. Just right-click a file and click 'Delete' to delete a file.")
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -70,44 +70,44 @@
|
|||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="API.vb" />
|
||||
<Compile Include="BasicWM_ColorTable.vb" />
|
||||
<Compile Include="basicwm_infobox.Designer.vb">
|
||||
<Compile Include="APIs\API.vb" />
|
||||
<Compile Include="Menu Renderers\BasicWM_ColorTable.vb" />
|
||||
<Compile Include="BWM and CMD Apps\basicwm_infobox.Designer.vb">
|
||||
<DependentUpon>basicwm_infobox.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="basicwm_infobox.vb">
|
||||
<Compile Include="BWM and CMD Apps\basicwm_infobox.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="basicwm_renderer.vb" />
|
||||
<Compile Include="Menu Renderers\basicwm_renderer.vb" />
|
||||
<Compile Include="BWM User Controls\Titlebar.Designer.vb">
|
||||
<DependentUpon>Titlebar.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BWM User Controls\Titlebar.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BWMDesktop.Designer.vb">
|
||||
<Compile Include="Desktop Environments\BWMDesktop.Designer.vb">
|
||||
<DependentUpon>BWMDesktop.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BWMDesktop.vb">
|
||||
<Compile Include="Desktop Environments\BWMDesktop.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ColorPicker.Designer.vb">
|
||||
<Compile Include="BWM and CMD Apps\ColorPicker.Designer.vb">
|
||||
<DependentUpon>ColorPicker.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ColorPicker.vb">
|
||||
<Compile Include="BWM and CMD Apps\ColorPicker.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="file skimmer.Designer.vb">
|
||||
<Compile Include="BWM and CMD Apps\file skimmer.Designer.vb">
|
||||
<DependentUpon>file skimmer.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="file skimmer.vb">
|
||||
<Compile Include="BWM and CMD Apps\file skimmer.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="filesystem.vb" />
|
||||
<Compile Include="Hijack.Designer.vb">
|
||||
<Compile Include="APIs\filesystem.vb" />
|
||||
<Compile Include="Other\Hijack.Designer.vb">
|
||||
<DependentUpon>Hijack.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Hijack.vb">
|
||||
<Compile Include="Other\Hijack.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
|
@ -125,45 +125,45 @@
|
|||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="saveengine.vb" />
|
||||
<Compile Include="shiftorium_api.vb" />
|
||||
<Compile Include="shiftorium_cmd.Designer.vb">
|
||||
<Compile Include="APIs\saveengine.vb" />
|
||||
<Compile Include="APIs\shiftorium_api.vb" />
|
||||
<Compile Include="BWM and CMD Apps\shiftorium_cmd.Designer.vb">
|
||||
<DependentUpon>shiftorium_cmd.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="shiftorium_cmd.vb">
|
||||
<Compile Include="BWM and CMD Apps\shiftorium_cmd.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Terminal.Designer.vb">
|
||||
<Compile Include="Other\Terminal.Designer.vb">
|
||||
<DependentUpon>Terminal.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Terminal.vb">
|
||||
<Compile Include="Other\Terminal.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TerminalGames.vb" />
|
||||
<Compile Include="TextPad.Designer.vb">
|
||||
<Compile Include="APIs\TerminalGames.vb" />
|
||||
<Compile Include="BWM and CMD Apps\TextPad.Designer.vb">
|
||||
<DependentUpon>TextPad.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TextPad.vb">
|
||||
<Compile Include="BWM and CMD Apps\TextPad.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="basicwm_infobox.resx">
|
||||
<EmbeddedResource Include="BWM and CMD Apps\basicwm_infobox.resx">
|
||||
<DependentUpon>basicwm_infobox.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BWM User Controls\Titlebar.resx">
|
||||
<DependentUpon>Titlebar.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BWMDesktop.resx">
|
||||
<EmbeddedResource Include="Desktop Environments\BWMDesktop.resx">
|
||||
<DependentUpon>BWMDesktop.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ColorPicker.resx">
|
||||
<EmbeddedResource Include="BWM and CMD Apps\ColorPicker.resx">
|
||||
<DependentUpon>ColorPicker.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="file skimmer.resx">
|
||||
<EmbeddedResource Include="BWM and CMD Apps\file skimmer.resx">
|
||||
<DependentUpon>file skimmer.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Hijack.resx">
|
||||
<EmbeddedResource Include="Other\Hijack.resx">
|
||||
<DependentUpon>Hijack.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
|
@ -172,13 +172,13 @@
|
|||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="shiftorium_cmd.resx">
|
||||
<EmbeddedResource Include="BWM and CMD Apps\shiftorium_cmd.resx">
|
||||
<DependentUpon>shiftorium_cmd.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Terminal.resx">
|
||||
<EmbeddedResource Include="Other\Terminal.resx">
|
||||
<DependentUpon>Terminal.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="TextPad.resx">
|
||||
<EmbeddedResource Include="BWM and CMD Apps\TextPad.resx">
|
||||
<DependentUpon>TextPad.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
@ -203,6 +203,7 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\Folder1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Reference in a new issue