It is currently May 1st, 2024, 5:43 pm

[SOLVED] Meter Fade Options

Report bugs with the Rainmeter application and suggest features.
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

[SOLVED] Meter Fade Options

Post by exper1mental »

Simple suggestion (probably complex in practice ofc):
Add (two) new bangs that allow you to hide/show meters. Example: MeterHideFade and MeterShowFade.

This would be a lifesaver for those of us who don't like having a billion .ini files but also would like smooth transitions w/o having to create abnormally complex skins (and even then its usually choppy at best).

Thank you for your time,
Exper1mental
Last edited by exper1mental on January 27th, 2013, 5:49 pm, edited 1 time in total.
Image
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: Meter Fade Options

Post by Virginityrocks »

I don't know if this helps you, but immediately you can do this with Calc measures with Formula=Counter % 255. And have the meter's transparency (255 - #CALCMEASURE#).

[Rainmeter]
Update=10

[CalcMeasure]
Measure=Calc
Formula=Counter % 255
IfEqualValue=254
IfEqualAction=!HideMeter Meter1
Disabled=1

[Meter1]
Meter=Image
ImageName=Image.PNG
ImageTint=255,255,255,(255 - #CalcMeasure#)
LeftMouseUpAction=!EnableMeasure CalcMeasure
DynamicVariables=1
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
lysy1993lbn
Posts: 291
Joined: July 25th, 2011, 9:53 am
Location: Lublin, Poland

Re: Meter Fade Options

Post by lysy1993lbn »

You can also use Kaelri's Smooth Meter Fade In/Out lua script.
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Meter Fade Options

Post by exper1mental »

Virginityrocks wrote:I don't know if this helps you, but immediately you can do this with Calc measures with Formula=Counter % 255. And have the meter's transparency (255 - #CALCMEASURE#).

[Rainmeter]
Update=10

[CalcMeasure]
Measure=Calc
Formula=Counter % 255
IfEqualValue=254
IfEqualAction=!HideMeter Meter1
Disabled=1

[Meter1]
Meter=Image
ImageName=Image.PNG
ImageTint=255,255,255,(255 - #CalcMeasure#)
LeftMouseUpAction=!EnableMeasure CalcMeasure
DynamicVariables=1
k, I'll go give that a shot.

Thanks!


@ lysy1993lbn
That's what I originally tried, the problem is that script wants to do a continuous fade, and its rather messy to try to work around that. If what Virginity said doesn't work I'll give it another shot (reluctantly).
Image
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Meter Fade Options

Post by eclectic-tech »

You might want to use ImageAlpha= instead of ImageTint= since you only want to change the visibility and not the color.
Virginityrocks wrote:I don't know if this helps you, but immediately you can do this with Calc measures with Formula=Counter % 255. And have the meter's transparency (255 - #CALCMEASURE#).

[Rainmeter]
Update=10

[CalcMeasure]
Measure=Calc
Formula=Counter % 255
IfEqualValue=254
IfEqualAction=!HideMeter Meter1
Disabled=1

[Meter1]
Meter=Image
ImageName=Image.PNG
ImageAlpha=(255 - #CalcMeasure#)
LeftMouseUpAction=!EnableMeasure CalcMeasure
DynamicVariables=1
You are going to need measures to fade-in and to check current alpha state.
Then based on that value, fade-in or fade-out (which Kaelri's script does for you)...
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Meter Fade Options

Post by exper1mental »

Hmm... I keep getting Formula: Syntax error in key "ImageAlpha" in [StartOrbb]
[Rainmeter]
;Update=10
SkinPath=#SKINSPATH#
;OnRefreshAction=[!Move "0" "(#SCREENAREAHEIGHT#-50)"]

[CalcMeasure]
Measure=Calc
Formula=Counter % 255
IfEqualValue=254
IfEqualAction=[!HideMeter StartOrbb]
Disabled=1

[StartOrb]
Meter=BUTTON
ButtonImage=#@#\transparent.png
H=50
W=50
MouseOverAction=!EnableMeasure CalcMeasure
;[!ActivateConfig "Start Menu\Win 8 - Metro\Start Orbs" "StartOrb.ini"]
DynamicVariables=1

[StartOrbb]
Meter=BUTTON
ButtonImage="#@#Start Orb\metrostartorb.png"
H=50
W=50
ImageTint=#OrbTint#
ImageAlpha=(255 - #CalcMeasure#)
LeftMouseUpAction=[!ActivateConfig "Start Menu\Win 8 - Metro\Menu" "MultiStartSmall.ini"]
;MouseLeaveAction=!EnableMeasure CalcHideMeasure
;[!DeactivateConfig]
DynamicVariables=1
What am I doing wrong?
Image
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Meter Fade Options

Post by eclectic-tech »

I apologize for not looking closer at the code provided to you...

They referred to a variable that was not updated; #CalcMeasure# ...

You could try changing the line in StartOrbb to

ImageAlpha=(255-[CalcMeasure])

Other changes will be necessary. I'll play with the code and see what I can discover.
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Meter Fade Options

Post by exper1mental »

k, it fades now. The problem now is once the fade has gone through the cycle one the button goes transparent and you can't bring it back. If I move change IfEqualValue to 255 it cycles through the fade non-stop, which is also not helpful. I also tried removing the [!HideMeter StartOrbb], same result as trying the 255.

I got it such that when you hover it after it has faded out, it sometimes comes back (after a few seconds), but has no fade in.
[Rainmeter]
Update=10
SkinPath=#SKINSPATH#
;OnRefreshAction=[!Move "0" "(#SCREENAREAHEIGHT#-50)"]

[CalcMeasure]
Measure=Calc
Formula=Counter % 255
IfEqualValue=254
IfEqualAction=[!HideMeter StartOrbb]
Disabled=1

[CalcMeasureb]
Measure=Calc
Formula=Counter % 255
IfEqualValue=0
IfEqualAction=[!ShowMeter StartOrbb]
Disabled=1

[StartOrb]
Meter=BUTTON
ButtonImage=#@#\transparent.png
H=50
W=50
MouseLeaveAction=[!EnableMeasure CalcMeasure][!DisableMeasure CalcMeasureb]
MouseOverAction=[!DisableMeasure CalcMeasure][!EnableMeasure CalcMeasureb]
;[!ActivateConfig "Start Menu\Win 8 - Metro\Start Orbs" "StartOrb.ini"]
DynamicVariables=1

[StartOrbb]
Meter=BUTTON
ButtonImage="#@#Start Orb\metrostartorb.png"
H=50
W=50
ImageTint=#OrbTint#
ImageAlpha=(255 - [CalcMeasure] + [CalcMeasureb])
LeftMouseUpAction=[!ActivateConfig "Start Menu\Win 8 - Metro\Menu" "MultiStartSmall.ini"]
MouseLeaveAction=[!EnableMeasure CalcMeasure][!DisableMeasure CalcMeasureb]
MouseOverAction=[!DisableMeasure CalcMeasure][!EnableMeasure CalcMeasureb]
;[!DeactivateConfig]
DynamicVariables=1
Image
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Meter Fade Options

Post by dragonmage »

I'm not sure what the exact effect you are going for is. Could you explain what you want to happen step by step? I have a feeling you just need a MinValue to stop the fade from going all the way to "0".
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Meter Fade Options

Post by exper1mental »

Its working now, dragonmage, thanks to some help from eclectic-tech.


In case any else is trying to do something like this, here is the code:
[Rainmeter]
Update=25
SkinPath=#SKINSPATH#
;OnRefreshAction=[!Move "0" "(#SCREENAREAHEIGHT#-50)"]

[Variables]
A=255
@Include=#@#Variables.inc

[CalcMeasure]
Measure=Calc
Formula=Counter % 32
IfEqualValue=31
IfEqualAction=[!DisableMeasure CalcMeasure][!SetVariable A (255)]
;[!HideMeter StartOrbb]
Disabled=1

[CalcMeasureb]
Measure=Calc
Formula=Counter % 32
;255
IfEqualValue=31
;254
IfEqualAction=[!DisableMeasure CalcMeasureb][!SetVariable A (0)]
Disabled=1

[StartOrb]
Meter=Image
ImageName=#@#transparent.png
H=50
W=50
;MouseLeaveAction=[!EnableMeasure CalcMeasure]
;[!DisableMeasure CalcMeasureb]
MouseOverAction=[!DisableMeasure CalcMeasure][!EnableMeasure CalcMeasureb]
;[!ShowMeter StartOrbb]
;[!EnableMeasure CalcMeasureb]
;[!ActivateConfig "Start Menu\Win 8 - Metro\Start Orbs" "StartOrb.ini"]
DynamicVariables=1

[StartOrbb]
Meter=Image
ImageName="#Orb#"
H=50
W=50
;ImageTint=#OrbTint#
ImageAlpha=(255 - (8 * [CalcMeasure]) + (8 * [CalcMeasureb]) - #A#)
lIfEqualValue=0
lIfEqualAction=[!DisableMeasure CalcMeasure]
LeftMouseUpAction=[!ActivateConfig "Start Menu\Win 8 - Metro\Menu" "MultiStart.ini"]
MouseLeaveAction=[!EnableMeasure CalcMeasure][!DisableMeasure CalcMeasureb][!SetVariable A (0)]
;[!DisableMeasure CalcMeasureb]
MouseOverAction=[!DisableMeasure CalcMeasure][!EnableMeasure CalcMeasureb]
;[!SetVariable A (0)]
;[!EnableMeasure CalcMeasureb]
;[!DeactivateConfig]
DynamicVariables=1
---How it works---
Simple Version:
When not being hovered on, it appears as though nothing is on your screen where the skin is located. However when you hover over it the orb fades in and appears, if you move off of it regardless of how far into the fade it is it will fade back out.


Complex Version:
Ask and I'll cough it up.
Image