Hi all,
I started to code another Rainmeter skin today and I'd like to make my text lift on top of a bar. So if the bar goes up 10 pixels the text will also go up 10 pixels. I am currently trying this for my CPU but I also want to do this with my memory and disk space.
It is currently April 25th, 2024, 6:37 am
Bartext
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Bartext
In such cases, you have to dynamically reposition the string, on each update cycle, according to the value returned by the measure.Pimguin wrote:Hi all,
I started to code another Rainmeter skin today and I'd like to make my text lift on top of a bar. So if the bar goes up 10 pixels the text will also go up 10 pixels. I am currently trying this for my CPU but I also want to do this with my memory and disk space.
Take a look at the following code:
Code: Select all
[Rainmeter]
Update=1000
[MeasureCPU]
Measure=CPU
[MeterCPU]
MeasureName=MeasureCPU
Meter=BAR
X=0
Y=0
W=250
H=30
BarColor=185,250,160,255
SolidColor=150,150,150,255
BarOrientation=Horizontal
[MeterBackground]
Meter=Image
SolidColor=150,150,150,255
X=0R
Y=0r
W=72
H=30
[MeterCPUPercentage]
MeasureName=MeasureCPU
Meter=STRING
X=(2.5*[MeasureCPU])
Y=15r
FontColor=0,0,0
FontEffectColor=220,220,220
StringEffect=Shadow
FontSize=18
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFTCENTER
AntiAlias=1
Text=%1%
DynamicVariables=1
This code is done just for the CPU, but the same way you can add further parameters.
You do not have the required permissions to view the files attached to this post.