It is currently March 28th, 2024, 4:41 pm

Mouse "position" variables added

Changes made during the Rainmeter 2.5 beta cycle and earlier.
Post Reply
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Mouse "position" variables added

Post by jsmorley »

We have added new mouse position "macro" variables that can be used in the context of a mouse click action to provide the current X and Y position of the mouse relative to the meter or skin with the mouse action.

See Mouse Variables for details.

Here is an excellent example skin from Kaelri that shows how these new variables can be used:
Color Spectrum_0.1.rmskin
(35.55 KiB) Downloaded 413 times
User avatar
lysy1993lbn
Posts: 291
Joined: July 25th, 2011, 9:53 am
Location: Lublin, Poland
Contact:

Re: Mouse "position" variables added

Post by lysy1993lbn »

This is awesome!
Great work guys :thumbup:
User avatar
DigitalSpectrum
Posts: 32
Joined: January 17th, 2013, 1:45 pm
Location: Canada

Re: Mouse "position" variables added

Post by DigitalSpectrum »

This is great! :)

If I'm not mistaken, with a slight modification of the test skin, it could be used as a replacement for RainRGB at 1/10th the size? I re-sized the spectrum image and it still seems to find the colors correctly.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Mouse "position" variables added

Post by MerlinTheRed »

Very nice! This was requested quite often and should open up lots of new possibilities for skins. But why the new syntax with dollar signs? Wouldn't it be simpler to just use the normal variable syntax with #? Adding new syntax just for the sake of one small feature seems a bit too much.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Mouse "position" variables added

Post by jsmorley »

MerlinTheRed wrote:Very nice! This was requested quite often and should open up lots of new possibilities for skins. But why the new syntax with dollar signs? Wouldn't it be simpler to just use the normal variable syntax with #? Adding new syntax just for the sake of one small feature seems a bit too much.
The behavior of this functionality is so different from any kind of normal variable that we didn't want to confuse things. If you look at how $UserInput$ is used in InputText, it is much closer to that, more like a "macro" than a "variable", and thus using a consistent syntax makes some sense.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Mouse "position" variables added

Post by MerlinTheRed »

You're right. I forgot about $UserInput$. In this context the choice makes perfect sense.
Post Reply