View unanswered posts | View active topics It is currently October 30th, 2014, 5:28 pm



Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
 Creating Buttons 
Author Message
Online

Developer

User avatar

Joined: April 19th, 2009, 11:02 pm
Posts: 11057
Location: Fairfax, VA
Post Creating Buttons
April 28th, 2009, 4:19 pm
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.

Image

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.

Image UP

Image DOWN

Image OVER

Hope this is of some help for those just starting to look at buttons for your skins.

Profile

Administrator

User avatar

Joined: April 3rd, 2009, 4:29 pm
Posts: 1338
Location: Santa Fe, NM
Post Re: Creating Buttons
April 28th, 2009, 4:53 pm
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.

Profile WWW
Online

Developer

User avatar

Joined: April 19th, 2009, 11:02 pm
Posts: 11057
Location: Fairfax, VA
Post Re: Creating Buttons
April 28th, 2009, 5:03 pm
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.


There is Photoshop and then there is everything else... ;-)

Profile

Administrator

User avatar

Joined: April 3rd, 2009, 4:29 pm
Posts: 1338
Location: Santa Fe, NM
Post Re: Creating Buttons
April 28th, 2009, 5:10 pm
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 :D

Profile WWW
Online

Developer

User avatar

Joined: April 19th, 2009, 11:02 pm
Posts: 11057
Location: Fairfax, VA
Post Re: Creating Buttons
April 28th, 2009, 5:17 pm
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)

Profile

Administrator

User avatar

Joined: April 3rd, 2009, 4:29 pm
Posts: 1338
Location: Santa Fe, NM
Post Re: Creating Buttons
April 28th, 2009, 5:26 pm
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 :cry:

All things in time :D

Profile WWW
Online

Developer

User avatar

Joined: April 19th, 2009, 11:02 pm
Posts: 11057
Location: Fairfax, VA
Post Re: Creating Buttons
April 28th, 2009, 5:45 pm
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 :cry:

All things in time :D


CS3 is perfectly fine for 99.999% of things. There isn't that much new in CS4 that you can't live without.

Profile

Administrator

User avatar

Joined: April 3rd, 2009, 4:29 pm
Posts: 1338
Location: Santa Fe, NM
Post Re: Creating Buttons
April 28th, 2009, 6:17 pm
Cool

thanks for the info :ugeek:

I just hate missing out the latest toys :D

Profile WWW

Joined: June 12th, 2009, 6:45 pm
Posts: 14
Location: California
Post Re: Creating Buttons
June 12th, 2009, 11:41 pm
can you show me what the code would look like if you were to do the "up", "down", and "hover" ?

Profile WWW
Online

Developer

User avatar

Joined: April 19th, 2009, 11:02 pm
Posts: 11057
Location: Fairfax, VA
Post Re: Creating Buttons
June 13th, 2009, 12:17 am
r3ginald wrote:
can you show me what the code would look like if you were to do the "up", "down", and "hover" ?


[MeterSample]
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.

Profile
Display posts from previous:  Sort by  
Reply to topic   [ 58 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.