It is currently April 27th, 2024, 4:29 am
Get help with creating, editing & fixing problems with skins
kami
Posts: 39 Joined: July 3rd, 2010, 10:47 am
Location: Canosa di Puglia, Italy
Post
by kami » July 10th, 2010, 6:11 pm
I have a string meter and i want to rotate the text by changing the
Angle parameter.
Unfortunately this parameter measures values in radians but i need to define it in degrees.
To perform this i thought i could create a particular formula to convert degrees to radians.
The measure is called MeasureAngle and uses a variable #ANGLE# to acquire the value in degrees. The formula is mathematically correct but when i put
Angle=MeasureAngle
between String meter parameters it doesn't work. The text doesn't rotate.
Why?
I attached my ini file's code.
Code: Select all
;VARIABLES
[Variables]
BLACK=Colors\Black.png
ANGLE=20
TEXT=Notepad
;MEASURES
[MeasureAngle]
Measure=Calc
Formula=( ( #ANGLE# / 180 ) * PI )
;METERS
[Icon Meter]
Meter=IMAGE
ImageName=#BLACK#
W=157
AntiAlias=1
PreserveAspectRatio=1
ImageFlip=None
ImageRotate=0
LeftMouseDoubleClickAction=!Execute ["%WINDIR%\notepad.exe"]
[Title Meter]
Meter=STRING
Text=#TEXT#
X=60
Y=22
Angle=MeasureAngle
FontColor=255,255,255,255
FontFace="Trebuchet MS"
StringStyle=Normal
FontSize=12
AntiAlias=1
maminscris
Posts: 509 Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°
Post
by maminscris » July 10th, 2010, 7:12 pm
cause you can not use a measure to define an angle
rainmeter reads measure and the value is displayed by a meter
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
kami
Posts: 39 Joined: July 3rd, 2010, 10:47 am
Location: Canosa di Puglia, Italy
Post
by kami » July 10th, 2010, 7:20 pm
Thank you! But how can i solve this?
~Faradey~
Posts: 366 Joined: November 12th, 2009, 4:47 pm
Location: Ukraine
Post
by ~Faradey~ » July 10th, 2010, 7:29 pm
kami wrote: Thank you! But how can i solve this?
Actually Yes! Here what you need to change
add DynamicVariables=1 and Angle=[MeasureAngle]
Look at the code
Code: Select all
[Title Meter]
Meter=STRING
Text=#TEXT#
X=60
Y=22
Angle=[MeasureAngle]
FontColor=255,255,255,255
FontFace="Trebuchet MS"
StringStyle=Normal
FontSize=12
AntiAlias=1
DynamicVariables=1