So I am trying to make my gauge resizable, I'm using the formulas used in this skin: https://www.deviantart.com/osricwuscfrea/art/Photos-1-0-574947616
I actually managed to make it resizable, but my problem is that it won't adjust the text accordingly to the gauge's size.
Here's the code:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
[Metadata]
Name= GPUGauge
Author= RicardoTM
Information= A Gauge trying to be resizable
Version= 0.3
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0
[Variables]
GPUTempIndex=9
;Gauge Size - default size, so 170 means the meter starts off at 340 x 340 pixels.
GaugeSize=170
;The amount gauge grows or shrinks when scrolling mouse in pixels
ScrollMouseIncrement=10
[StyleText]
StringAlign=Center
StringStyle=Bold
StringEffect=Shadow
FontColor=225,225,225
FontEffectColor=0,0,0,
AntiAlias=1
[MeasureGPUTempValueRaw]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=ValueRaw#GPUTempIndex#
[MeasureGPUTempValueOf15]
Measure=Calc
Formula=([MeasureGPUTempValueRaw]/(130/16))
DynamicVariables=1
[MeterGauge0]
Meter=Image
ImageName=#@#Images\states\[MeasureGPUTempValueof15:0].png
PreserveAspectRatio=1
UseExifOrientation=1
H=(#GaugeSize#)*2
W=(#GaugeSize#)*2
X=0
Y=0
MouseScrollDownAction=[!SetVariable GaugeSize "(#GaugeSize#-#ScrollMouseIncrement# < 90 ? 90 : #GaugeSize#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables GaugeSize "(#GaugeSize#-#ScrollMouseIncrement# < 90 ? 90 : #GaugeSize#-#ScrollMouseIncrement#)"][!UpdateMeter *][!UpdateMeasure *][!Redraw]
MouseScrollUpAction=[!SetVariable GaugeSize "(#GaugeSize#+#ScrollMouseIncrement# > 170 ? 170 : #GaugeSize#+#ScrollMouseIncrement#)"] [!WriteKeyValue Variables GaugeSize "(#GaugeSize#+#ScrollMouseIncrement# > 170 ? 170 : #GaugeSize#+#ScrollMouseIncrement#)"][!UpdateMeasure *][!UpdateMeter *][!Redraw]
DynamicVariables=1
[MeterText]
Meter=String
MeterStyle=StyleText
x=(#GaugeSize#)*1
y=(#GaugeSize#)-30
Text=[MeasureGPUTempValueRaw:0]
FontSize=(#GaugeSize#)*0.235
fontName=HelveticaNeueLT Std
DynamicVariables=1
[MeterTextGpu]
Meter=String
MeterStyle=StyleText
x=(#GaugeSize#)*1
y=(#GaugeSize#)+70
Text=GPU
FontSize=(#GaugeSize#)*0.165
fontName=HelveticaNeueLT Std
DynamicVariables=1