It is currently March 29th, 2024, 12:57 am

Use Measures in Color,Font,etc..

Report bugs with the Rainmeter application and suggest features.
User avatar
RetardedRaven
Posts: 16
Joined: July 8th, 2009, 10:42 pm

Use Measures in Color,Font,etc..

Post by RetardedRaven »

Now I'm not sure how hard of a change this would be (I assume difficult because of how these values are done logically) But a welcome change would be the function of using measures for things more than then just plugging it into a meter.

Example: What's possible now.

Code: Select all

[TestCpuMeter]
Meter=String
MeasureName=MeasureCpu
X=0
Y=0
FontFace=Arial
FontSize=12
FontColor=250,250,250
AntiAlias=1
Text="Cpu: %1"
Example: What would be nice (possibly different syntax though)

Code: Select all

[TestSizeCpuMeter]
Meter=String
MeasureName=MeasureCpu
X=0
Y=0
FontFace=Arial
FontSize=%1 <--This is the change so that the font's size is dependant on the measure
FontColor=250,250,250
AntiAlias=1
Text="Cpu: %1"
Currently if you wanted calc measure could produce this effect by toggling the meters in turn. Namely you have 100 meters each with a different font size and calc would get the right measure from cpu and turn on and off the correct meter. This however is very clunky, and makes for more "copied" code.
sgtevmckay

Re: Use Measures in Color,Font,etc..

Post by sgtevmckay »

I see where you are going, I think

you start at
1%
and go to
100%

With a color variable attached along the way: yes?
so something like this:
1%
to
100%
User avatar
RetardedRaven
Posts: 16
Joined: July 8th, 2009, 10:42 pm

Re: Use Measures in Color,Font,etc..

Post by RetardedRaven »

Exactly it'd be great and not only would it give an animation type feel to some meters, it would make for some very interestign skins (Changing colors would probably require some interesting calc measures) but yeah. Mostly though it's to anything that a string or image has, Xpos, Ypos String style and effect. Basically to make it so that instead of manually placing the info or using a variable you can use a measure instead.

It's similar in a way to having dynamic variables but (No basis here) I think having the configs accept measures would be easier than making a bang that changes the variables.
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Use Measures in Color,Font,etc..

Post by Chewtoy »

In that case, I feel like I might have something to add, or I just didn't understand what exactly you said.

You got your meter. Lets say text. You have 2 colours (or one colour and one transparent).

Code: Select all

"This is some text"
FontColor=Colour1
FontColor2=Colour2
FontColorGradient=50%
So, you get a gradient colour instead of just on. The FontColorGradient defines where the dominant colour switch will be.
Then we can have like, FontColorSmooth=34% - which gives how much blending of the colours there will be.
I don't know if that would be possible, but it should. Might be tricky to code though?
This way, we don't need to change the colour of every letter if we want an overpass of two colours. Rainmeter would do that for us.
I don't think, therefore I'm not.
User avatar
RetardedRaven
Posts: 16
Joined: July 8th, 2009, 10:42 pm

Re: Use Measures in Color,Font,etc..

Post by RetardedRaven »

Chewtoy: uhhhh what? This doesn't really have anything to do with color exactly but basically anything in string from x, y, font, style, effect, color. And the same for images, bars, and roundlines.

Ill admit having gradients would be cool, but this was mostly that for anything you have in the meter can be tied with a measure.

Essentially it's making it so that %1 can be used anywhere in a meter to represent the measure rather than just text and percentage and such.
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Use Measures in Color,Font,etc..

Post by Alex2539 »

This would be an incredibly useful feature. Especially with a Transformation Matrix. If Measures could be used, I'm pretty certain I could make a rotating cube. Rotating. Cube. How cool is that?! You could have also have motion... maybe a little guy that just wanders the screen?

Seriously though, I think I remember someone somewhere saying something about things like this being difficult to implement, so I wouldn't exactly commit too many resources to getting it done soon. It is, however, just a hop a way from dynamic variables. So if that ever gets done maybe just keep this bit in mind since it's not only a logical extension of that, but a very useful one.
ImageImageImageImage
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Use Measures in Color,Font,etc..

Post by Kaelri »

I think that had more to do with using Measures as values in the [Variables] section, which is what everyone was referring to as a "chicken or egg" problem. But this is something I've been desperately craving, and I don't see why it shouldn't be possible, since Rainmeter already does it in limited ways: you can use a measure within another measure (with Calc), and any measure can be formatted as a text string (with, naturally, String), which is presumably all it needs to be used in any key - X/Y, size, color, etc.

The skin's Update rate would determine how quickly the value updates (so you'd need Update=100 to make that little figure move at 10FPS, for example), which could be a hit to the user's processor. But it seems to me like all the necessary mechanisms are already there.
User avatar
JamesAC
Developer
Posts: 318
Joined: July 14th, 2009, 5:57 pm

Re: Use Measures in Color,Font,etc..

Post by JamesAC »

I have to agree that this would be a welcome addition to Rainmeter and would create a huge number of new possibilities of what could be done.

I just hope its not too much work to implement.
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Quis custodiet ipsos custodes?
User avatar
RetardedRaven
Posts: 16
Joined: July 8th, 2009, 10:42 pm

Re: Use Measures in Color,Font,etc..

Post by RetardedRaven »

Right so there was a workaround to dynamic variables but I realized a bug. Ill post an updated code with guide in plugins thing later.
Last edited by RetardedRaven on August 17th, 2009, 5:50 am, edited 1 time in total.
User avatar
JamesAC
Developer
Posts: 318
Joined: July 14th, 2009, 5:57 pm

Re: Use Measures in Color,Font,etc..

Post by JamesAC »

Wow very nice work, I will have to try that out soon.

I cant see if there is a way to use this directly from rainmeters measures but it is certainly heading the right way. :D
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Quis custodiet ipsos custodes?