It is currently March 24th, 2019, 10:46 pm

Mouse "position" variables added

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

Mouse "position" variables added

jsmorley » January 21st, 2013, 1:00 pm

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
You do not have the required permissions to view the files attached to this post.
lysy1993lbn
Posts: 286
Joined: July 25th, 2011, 9:53 am
Location: Manchester, UK

Re: Mouse "position" variables added

lysy1993lbn » January 21st, 2013, 1:34 pm

This is awesome!
Great work guys :thumbup:
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
User avatar
DigitalSpectrum
Posts: 32
Joined: January 17th, 2013, 1:45 pm
Location: Canada

Re: Mouse "position" variables added

DigitalSpectrum » January 21st, 2013, 4:01 pm

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: 911
Joined: September 6th, 2011, 6:34 am

Re: Mouse "position" variables added

MerlinTheRed » January 23rd, 2013, 8:27 pm

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.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
jsmorley
Developer
Posts: 19076
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Mouse "position" variables added

jsmorley » January 23rd, 2013, 8:30 pm

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: 911
Joined: September 6th, 2011, 6:34 am

Re: Mouse "position" variables added

MerlinTheRed » January 23rd, 2013, 10:30 pm

You're right. I forgot about $UserInput$. In this context the choice makes perfect sense.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!