Results 1 to 1 of 1
04-17-2013, 02:35 PM #1
What's a MouseState, and why use them?
This is a little tutorial for people just starting to create themes for Visual Basic. I'll just be explaining MouseStates, and what you can do with them. If you don't know how to setup the start of a theme, just go grab AeonHacks theme base. Here
Alrighty, so let's get started.
First, make a new Sub, like this.
Sub Weary() SetColor("Button", Color.SkyBlue) SetColor("Text", Color.Black) SetColor("Border", Color.Black) End Sub
Second, go to your colorhook and input this.
ButtonColor = GetColor("Button") TextColor = GetBrush("Text") Border = GetPen("Border")
Select case state Case MouseState.None End Select
Select case state Case MouseState.None G.DrawRectangle(Border, Weary Rectangle(0, 0, Width - 1, Height - 1)) DrawText(TextColor, HorizontalAlignment.Center, 0, 0) End Select
So that covers the button when nothing is happening, but now let's move on to when your mouse is hovering over the button.
So, it's basically the same thing, except this time the case is different.
Tip: You can just C+P from the Case MouseState.None and change a few things and it will look nice.
Okay, so now let's move on to when the button is clicked.
This is a repost from my old account, I want control of this thread once again.
I've posted this on many sites under different handles. Variety, Weary, Sky, CuntPunter, CuntPuncher, and maybe a few more. But I wrote it originally for CodeLeakers.