The only problem I have is that:
It is currently April 26th, 2024, 11:59 pm
[Not Solved] Measure: Help with Percentage Input Problem
-
- Posts: 155
- Joined: July 29th, 2014, 7:02 pm
[Not Solved] Measure: Help with Percentage Input Problem
I am making a skin with a meter that includes a SolidColor, and I want to implement an 'opacity' option to this meter.
The only problem I have is that:
Here is the skin's .ini:
The only problem I have is that:
[Insert Joke Here]
-
- Posts: 305
- Joined: August 14th, 2009, 8:04 am
Re: [Not Solved] Measure: Help with Percentage Input Problem
Remove the brackets in IfCondition. See the example in the doc.
Code: Select all
IfCondition=MeasurePercentage > 100
IfCondition2=MeasurePercentage < 0
-
- Posts: 155
- Joined: July 29th, 2014, 7:02 pm
Re: [Not Solved] Measure: Help with Percentage Input Problem
Still doesn't want to work.
Here is the new measure:
Though I have discovered something, when I set the opacity to 110, the opacity is actually set to 10, and if I put 130, then it would be set to 30...
I am still having the situation of the measure not working!
Here is the new measure:
I am still having the situation of the measure not working!
[Insert Joke Here]
-
- Posts: 56
- Joined: December 27th, 2011, 12:32 pm
Re: [Not Solved] Measure: Help with Percentage Input Problem
If you get the latest 3.2 Beta, there is a Clamp function that would make this easier.
Code: Select all
[Variables]
Input=10
Output=(Clamp(#Input#,0,100)*255/100)
[Background]
Meter=String
.
.
SolidColor=255,255,255,#Output#
-
- Posts: 305
- Joined: August 14th, 2009, 8:04 am
Re: [Not Solved] Measure: Help with Percentage Input Problem
The same thing could have been accomplished before using ternary. I can perhaps see the ease of use of Clamp(), but Min() and Max() barely simplify anything.
You need DynamicVariables=1 to use formulas in place of static values.
You need DynamicVariables=1 to use formulas in place of static values.
Code: Select all
[Background]
...
SolidColor=255,255,255,((#Input#>100?100:(#Input#<0?0:#Input#))*2.55)
DynamicVariables=1
-
- Posts: 56
- Joined: December 27th, 2011, 12:32 pm
Re: [Not Solved] Measure: Help with Percentage Input Problem
Agreed. Clamp just provides a way of preventing the formula from getting over-complicated. There's usually more than on way of doing things in Rainmeter, which one to use depends on the person writing the skin.