summaryrefslogtreecommitdiff
path: root/shiftos_next/BWM and CMD Apps/Shifter.vb
diff options
context:
space:
mode:
authorTheUltimateHacker <[email protected]>2015-05-29 09:57:53 -0400
committerTheUltimateHacker <[email protected]>2015-05-29 09:57:53 -0400
commitccdbbbed1898c5073dc460a737cdd4b7c7036bb5 (patch)
tree8116d7794ad400533939128f958994e0782f7678 /shiftos_next/BWM and CMD Apps/Shifter.vb
parent424931951bf55c2db7a7cb3228bfccc03ea62287 (diff)
downloadshiftos-next-ccdbbbed1898c5073dc460a737cdd4b7c7036bb5.tar.gz
shiftos-next-ccdbbbed1898c5073dc460a737cdd4b7c7036bb5.tar.bz2
shiftos-next-ccdbbbed1898c5073dc460a737cdd4b7c7036bb5.zip
BWM - Skinning!
Yay! ShiftOS Next can finally be Shifted! Yes, that's true. I've added basic skinning to the Basic Window Manager. Currently, the only way to get to it is by typing "open shifter" in the Terminal, and the Shifter will open. Choose the settings you want and hit Apply! This is also the Alpha 3 commit, so after this I'll make the next release.
Diffstat (limited to 'shiftos_next/BWM and CMD Apps/Shifter.vb')
-rw-r--r--shiftos_next/BWM and CMD Apps/Shifter.vb42
1 files changed, 42 insertions, 0 deletions
diff --git a/shiftos_next/BWM and CMD Apps/Shifter.vb b/shiftos_next/BWM and CMD Apps/Shifter.vb
new file mode 100644
index 0000000..bb85cec
--- /dev/null
+++ b/shiftos_next/BWM and CMD Apps/Shifter.vb
@@ -0,0 +1,42 @@
+Public Class Shifter
+
+ Dim cp As Integer
+
+ Private Sub btntitletext_Click(sender As Object, e As EventArgs) Handles btntitletext.Click, btntitlebackcolor.Click, btndeskbackcolor.Click, btnntback.Click, btnnttext.Click
+ BasicWM.ColorPicker.oldcolor = sender.BackColor
+ BasicWM.ColorPicker.ShowDialog()
+ sender.BackColor = BasicWM.ColorPicker.Color
+ Dim random As New Random()
+ Dim cptoadd As Integer = random.Next(1, 5)
+ cp += cptoadd
+ End Sub
+
+ Public Sub loadsettings()
+ btntitletext.BackColor = titlebartextcolor
+ btntitlebackcolor.BackColor = titlebarcolor
+ btndeskbackcolor.BackColor = desktopbackcolor
+ btnntback.BackColor = newterminalbuttonbackcolor
+ btnnttext.BackColor = newterminalbuttontextcolor
+ End Sub
+
+ Private Sub btnapply_Click(sender As Object, e As EventArgs) Handles btnapply.Click
+ 'Store data in Skinning Engine
+ titlebartextcolor = btntitletext.BackColor
+ titlebarcolor = btntitlebackcolor.BackColor
+ desktopbackcolor = btndeskbackcolor.BackColor
+ newterminalbuttonbackcolor = btnntback.BackColor
+ newterminalbuttontextcolor = btnnttext.BackColor
+ 'Save to save file
+ saveskindata()
+ 'By now, the skin has been applied, so we'll tell the user how many codepoints they've earned.
+ AddCP(cp)
+ basicwm_infobox.showinfo("Shifter - Skin applied", "The skin has been applied to the desktop environment. You have earned " & cp & " Codepoints.")
+ End Sub
+
+ Private Sub Shifter_Load(sender As Object, e As EventArgs) Handles Me.Load
+ loadsettings()
+ Me.TopMost = True
+ Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
+ Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
+ End Sub
+End Class \ No newline at end of file