This is about how to create the button images you use in Rainmeter with code like this:
[MeterSample]
Meter=BUTTON
X=1
Y=1
ButtonImage=MyButton.png
ButtonCommand=!Execute ["SomeCommand"]
Buttons are a special kind of Meter in Rainmeter, and require a special kind of image. Rainmeter, like Windows, wants a button to have three "states". "UP", "DOWN" and "OVER", or "When your mouse isn't on the button", "When you are clicking on the button" and "When you are hovering over the button".
Create the images in Photoshop, Gimp, Paint.NET, whatever you like. It's VERY helpful if the tool has the capability to create "layers" however.
Create a new image with a transparent background which has the "HEIGHT" of the image you want for the button, and a "WIDTH" which is three times the width of the image. This is because Rainmeter will want to find three horizontal versions of the image in the file; one for "UP", one for "DOWN" and one for "OVER" - in that order.
Each of the layers can have a different visual appearance (and positioning if you want the button to "move" when clicked) so that when you use the button it is clear what state the button is in. I desaturated the "DOWN" state and added a "lens flare" to my "OVER" state.
Save the image as a .png (for a transparent background) or .jpg (solid background)
When you use the button in your code, Rainmeter chooses the 1/3 of the overall image to display depending on the state of the button.
UP
DOWN
OVER
Hope this is of some help for those just starting to look at buttons for your skins.
It is currently October 5th, 2024, 5:00 pm
Creating Buttons
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Buttons
There was someone asking about this earlier in the forum, I will have to find them and link it to here.
You definitely cut to the chase, the tut I was working on to explain, was getting way too wordy.
I also notice you apparently use Photoshop.
You definitely cut to the chase, the tut I was working on to explain, was getting way too wordy.
I also notice you apparently use Photoshop.
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Buttons
There is Photoshop and then there is everything else...sgtevmckay wrote:There was someone asking about this earlier in the forum, I will have to find them and link it to here.
You definitely cut to the chase, the tut I was working on to explain, was getting way too wordy.
I also notice you apparently use Photoshop.
Re: Creating Buttons
agreed; to a point.
I work with numerous graphics, and I find that when I get into a large project, i tend to end up using several editors/layouy designers; Ps3, Illustrator, InDesign, Premier, Gimp, Paintshop Pro, and believe it or not, I do rough drafts in Office Publisher.
And at times I get requests/contracts for web design and maintenance, and the Adobe collection really comes to Life
I work with numerous graphics, and I find that when I get into a large project, i tend to end up using several editors/layouy designers; Ps3, Illustrator, InDesign, Premier, Gimp, Paintshop Pro, and believe it or not, I do rough drafts in Office Publisher.
And at times I get requests/contracts for web design and maintenance, and the Adobe collection really comes to Life
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Buttons
I have found that Adobe does the job for me in just about all cases.. Photoshop CS4 for images, Illustrator CS4 for vector graphics, Flash CS4 for flash stuff, Dreamweaver CS4 for prototyping web pages. (I prototype in Dreamweaver, but code it in UltraEdit, I prefer hand coding)
Re: Creating Buttons
Nice.
I have not yet been able to come up with the cash to upgrade my AMC Cs3 yet. I hope to soon, but damn!
I got lucky when it came time to upgrade to Cs3, and landed a major contract which floated the bill (which I promptly wrote off at the end of the year), but I have yet to land "that" contract this time around
All things in time
I have not yet been able to come up with the cash to upgrade my AMC Cs3 yet. I hope to soon, but damn!
I got lucky when it came time to upgrade to Cs3, and landed a major contract which floated the bill (which I promptly wrote off at the end of the year), but I have yet to land "that" contract this time around
All things in time
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Buttons
CS3 is perfectly fine for 99.999% of things. There isn't that much new in CS4 that you can't live without.sgtevmckay wrote:Nice.
I have not yet been able to come up with the cash to upgrade my AMC Cs3 yet. I hope to soon, but damn!
I got lucky when it came time to upgrade to Cs3, and landed a major contract which floated the bill (which I promptly wrote off at the end of the year), but I have yet to land "that" contract this time around
All things in time
Re: Creating Buttons
Cool
thanks for the info :ugeek:
I just hate missing out the latest toys
thanks for the info :ugeek:
I just hate missing out the latest toys
-
- Posts: 12
- Joined: June 12th, 2009, 6:45 pm
- Location: California
Re: Creating Buttons
can you show me what the code would look like if you were to do the "up", "down", and "hover" ?
My Tumblog
Everything I have made is located at my blog. Visit for my latest updates, skins, themes/etc.
-------------------------------------
TEAM V.I.S.O.R.
devART
Everything I have made is located at my blog. Visit for my latest updates, skins, themes/etc.
-------------------------------------
TEAM V.I.S.O.R.
devART
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Buttons
[MeterSample]r3ginald wrote:can you show me what the code would look like if you were to do the "up", "down", and "hover" ?
Meter=BUTTON
X=1
Y=1
ButtonImage=MyButton.png
ButtonCommand=!Execute ["SomeCommand"]
That's it... "you" don't do the Up, Down and Over, Rainmeter does it automatically. You just need to put the button on a meter and define what you want to have happen when it is clicked.