Page 1 of 1

Mouse "position" variables added

Posted: January 21st, 2013, 1:00 pm
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

Re: Mouse "position" variables added

Posted: January 21st, 2013, 1:34 pm
by lysy1993lbn
This is awesome!
Great work guys :thumbup:

Re: Mouse "position" variables added

Posted: January 21st, 2013, 4:01 pm
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.

Re: Mouse "position" variables added

Posted: January 23rd, 2013, 8:27 pm
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.

Re: Mouse "position" variables added

Posted: January 23rd, 2013, 8:30 pm
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.

Re: Mouse "position" variables added

Posted: January 23rd, 2013, 10:30 pm
by MerlinTheRed
You're right. I forgot about $UserInput$. In this context the choice makes perfect sense.