It is currently March 28th, 2024, 2:36 pm

Creating Buttons

Tips and Tricks from the Rainmeter Community
Post Reply
Maart3n
Posts: 2
Joined: June 23rd, 2010, 7:30 pm

Re: Creating Buttons

Post by Maart3n »

I just added some volume buttons to the winamp plugin, but each click only increases/decreases it by only 1%. Would there be any way to make it refresh the command every 10th of a second as long as the button is down?

Thanks in advance.
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Creating Buttons

Post by Chewtoy »

Rainmeter has no way of knowing that you are still holding down the button.
But you might want to try a mix of LeftMouseDown and LeftMouseUp. So you start a counter with down, and stop it with Up or something like that.
Maart3n
Posts: 2
Joined: June 23rd, 2010, 7:30 pm

Re: Creating Buttons

Post by Maart3n »

Chewtoy wrote:Rainmeter has no way of knowing that you are still holding down the button.
But you might want to try a mix of LeftMouseDown and LeftMouseUp. So you start a counter with down, and stop it with Up or something like that.
Then it would only effect when the button would be released, and I would have to guess the volume change.
Well then, is there a way to make it execute something 10 times in a row beside cloning the line 10 times?
never mind figured it out.
duoblade
Posts: 9
Joined: November 25th, 2010, 7:34 am

Re: Creating Buttons

Post by duoblade »

I'm new to Rainmeter, but how do I make it so that my buttons don't all move together? I've made two so far but when I click and drag one, the other moves with it.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am
Contact:

Re: Creating Buttons

Post by Kaelri »

duoblade wrote:I'm new to Rainmeter, but how do I make it so that my buttons don't all move together? I've made two so far but when I click and drag one, the other moves with it.
For that, you'll need to move your buttons into separate skins and load them individually.
duoblade
Posts: 9
Joined: November 25th, 2010, 7:34 am

Re: Creating Buttons

Post by duoblade »

Alrighty. Thank you.

One more question please. For my "over", I have the image move upwards, which it's doing just fine. Problem is, when it moves upwards, my mouse is no longer "over" it, so it just jumps back down and then back up, like a flash up and down. Doesn't look good and makes it impossible to actually click it.

So is there anyway to have the icon move upwards, but still be transparent underneath it? Like a clickable transparency I guess.

Hope my question isn't confusing. I'm not sure how else to explain.

Thank you.
User avatar
Pandora
Posts: 24
Joined: November 4th, 2010, 2:23 pm
Location: East Coast, US

Re: Creating Buttons

Post by Pandora »

jsmorley wrote:There is Photoshop and then there is everything else... ;-)
I read your "creating buttons" post in the manual section today, and came to the forums for more info. I laughed so hard I almost spit out my coffee when I saw the above. Sorry to say, people who think that other apps can replace Photoshop just do not understand. :)
jsmorley wrote:Now create three layers on this image......
That part was clear. What was not clear was what to do with the three layers after they were ready. I come from old school where to make something "animated" you had to have at least two or more separate image files for a final image that was "animated". So that part of the readthrough made me go "eh?"
jsmorley wrote:Now save your entire image as a .png file.


Ah! So in other words, save the .psd file with the 3 layers as a .png file once the three layers are set up properly. Somehow, Rainmeter reads the information in said .png file, and knows there are three images there. How in heck that happens, I've not a clue. Thank goodness I found this though, else I'd have to to post a question. And in reading the entire thread, I found the correct meter code used when only one image is necessary for the task. Yes! Thanks again for posting such great material :)

-Pandora
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Creating Buttons

Post by jsmorley »

Yes, Rainmeter treats the .png as a "bitmap" (in the animated image sense, not the .bmp sense) and knows to divide the .png into three equal parts, either horizontal or vertical, and treat each part as a "frame".
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Creating Buttons

Post by Ao Nuu Shin »

Hey, I just created an account to ask this here...

First, I want to say thank you for your time, I was so frustrated, I started recently creating rainmeter themes/skins for the computer, and I want to share every bit of my work with everyone, problem is, I don't understand/know the codes, I'm trying to learn them and make tests, I want to create a chrome icon, which is black and when you mouseover it, it will glow a little. So far I have everything in order, the image, everything, problem is, it shows it as a half image, when I mouse over it, it glows but it's still showing the half of the image. I really don't know what else to do. I think i'm trapped. :/ Help please...

Down here, I give you three images, the first is standart, the second when the mouse is over the button, and the third is when you press it. Any ideas? Please, i'm desperate. XD
Attachments
3.jpg
Clicked.
2.jpg
Mouse over
1.jpg
No clicks, nothing.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Creating Buttons

Post by fonpaolo »

Basically, as a general suggestion, you have to create:
- first - create a reference layer with a square or a rectangle border, depending on your image size, plus maybe one pixel for every side, this should be copied other two times, the result is a layer with three identical borders (you can leave a pixel or more between any internal border or not).
- second - copy the images in the correct order inside every border.

The problem you have is caused by a wrong distance between your images, the button divides the width or height of your image in three identical spaces (depending if they're positioned horizontally or vertically), so, if the positioning is wrong, you end up with an half image.
Post Reply