Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1134

Help: Rainmeter Skins • Re: USing background image for hover state.

$
0
0
Absolutely, let’s simplify this. To make the background image solid on hover and invisible otherwise, you just need to adjust the ImageAlpha setting. Set it to 255 for full opacity on hover, and set it back to 0 for transparency when not hovering. Here's how you can update your code:

Code:

MouseOverAction=[!SetOption Final ImageAlpha "255"][!Update]MouseLeaveAction=[!SetOption Final ImageAlpha "0"][!Update]
What CodeCode meant above is that if you set the transparency of a meter to 0, that meter won't react anymore to mouse actions (like hovering the mouse over it for instance), because a such transparent meter can't detect a mouse action. This is why you should have to set its transparency to 1, instead of 0. In such a case, the meter becomes practically the same way invisible (its transparency being 1 from 255, so in fact little bit below 0.4%), but will fully react to mouse hovering. Accordingly your MouseOverAction and MouseLeaveAction option should look this way:

Code:

MouseOverAction=[!SetOption Final ImageAlpha "255"][!UpdateMeter "Final"][!Redraw]MouseLeaveAction=[!SetOption Final ImageAlpha "1"][!UpdateMeter "Final"][!Redraw]
And one more: I replaced the [!Update] bang by [!UpdateMeter "Final"][!Redraw]. No need to update the whole skin when you're performing such a mouse action, it's completely enough to update the involved meter and redraw the skin.

Statistics: Posted by balala — Today, 3:42 pm



Viewing all articles
Browse latest Browse all 1134

Trending Articles