It is currently March 29th, 2024, 9:13 am

FadeIn on MouseOverAction - Can't get it to work

Get help with creating, editing & fixing problems with skins
Ghost-Rid3r
Posts: 7
Joined: October 22nd, 2010, 6:12 pm

FadeIn on MouseOverAction - Can't get it to work

Post by Ghost-Rid3r »

I'm making a skin and everything is going fine, except...
I want my icons to be half-transparent and fade in to 100% on MouseOverAction. Adjusted the opacity on the .ini file successfully(used 128), but i can't make them to fade in to 255 when the mouse hovers it. Sure it's possible to make them to fade by right clicking, Settings, Transparency, but i want them already defined on the skin .ini file

I'm not expert on rainmeter skin development so i need a bit of help here :p
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: FadeIn on MouseOverAction - Can't get it to work

Post by jsmorley »

This will allow you to individually set the transparency of the icons in your skin:

[Rainmeter]
Update=500

[Variables]
Icon1Alpha=128
Icon2Alpha=128

[MeterIcon1]
Meter=Image
ImageName=Icon1.png
X=0
Y=0
ImageTint=255,255,255,#Icon1Alpha#
DynamicVariables=1
MouseOverAction=!RainmeterSetVariable Icon1Alpha 255
MouseLeaveAction=!RainmeterSetVariable Icon1Alpha 128

[MeterIcon2]
Meter=Image
ImageName=Icon2.png
X=0
Y=R
ImageTint=255,255,255,#Icon2Alpha#
DynamicVariables=1
MouseOverAction=!RainmeterSetVariable Icon2Alpha 255
MouseLeaveAction=!RainmeterSetVariable Icon2Alpha 128



If you want the ENTiRE skin to have the effect all at once, you can simply:

[Rainmeter]
Update=500
OnRefreshAction=!RainmeterSetTransparency 128
MouseOverAction=!RainmeterSetTransparency 255
MouseLeaveAction=!RainmeterSetTransparency 128

[MeterIcon1]
Meter=Image
ImageName=Icon1.png
X=0
Y=0

[MeterIcon2]
Meter=Image
ImageName=Icon2.png
X=0
Y=R

Hope this helps.
Ghost-Rid3r
Posts: 7
Joined: October 22nd, 2010, 6:12 pm

Re: FadeIn on MouseOverAction - Can't get it to work

Post by Ghost-Rid3r »

That works well but is it possible to add a "fade" effect?

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

Re: FadeIn on MouseOverAction - Can't get it to work

Post by jsmorley »

Ghost-Rid3r wrote:That works well but is it possible to add a "fade" effect?

Thanks in advance,
You can use the skin's context menu "Settings / Transparency" and set that to 50%, then set (in the same place) "Fade In". If you do this, you don't need any of the above code in the skin itself.
Ghost-Rid3r
Posts: 7
Joined: October 22nd, 2010, 6:12 pm

Re: FadeIn on MouseOverAction - Can't get it to work

Post by Ghost-Rid3r »

jsmorley wrote: You can use the skin's context menu "Settings / Transparency" and set that to 50%, then set (in the same place) "Fade In". If you do this, you don't need any of the above code in the skin itself.
well it seems i have to do it that way. Anyways thanks for your help :)