I think this skin demonstrates a lot of what I'm talking about.Is the pixel my mouse is on solid, and I don't care what made it solid, and is it within the boundaries defined by the meter this mouse action is on?
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
[MeterOne]
Meter=Image
W=200
H=200
SolidColor=255,0,0,110
MouseOverAction=[!SetOption MeterOne SolidColor "255,0,0,255"][!UpdateMeter MeterOne][!Redraw]
MouseLeaveAction=[!SetOption MeterOne SolidColor "255,0,0,110"][!UpdateMeter MeterOne][!Redraw]
LeftMouseUpAction=[!Log "Meter One"]
[MeterTwo]
Meter=Image
X=100
Y=100
W=200
H=200
SolidColor=0,255,0,255
MouseOverAction=[!SetOption MeterTwo SolidColor "0,255,0,255"][!UpdateMeter MeterTwo][!Redraw]
MouseLeaveAction=[!SetOption MeterTwo SolidColor "0,255,0,110"][!UpdateMeter MeterTwo][!Redraw]
MouseActionCursor=0
;LeftMouseUpAction=[!Log "Meter Two"]
The MouseActionCursor=0 on [MeterTwo] helps to see what is going on. See that it changes to the "hand", when over the red square, even when on the part behind the green square.
As far as LeftMouseUpAction is concerned, it's similar, but with one big difference. As long as only [MeterOne] has a LeftMouseUpAction, that is fired when the mouse is over that square, even the part behind the green square. However, if BOTH meters have a LeftMouseUpAction, (uncomment that one on [MeterTwo] to see) Then the one in front (later in the skin .ini file) is fired when the mouse is in a position where the squares overlap. It will never fire both.
So to "protect" a meter from having a LeftMouseUpAction (or any click action) fired when you are over it, and there is a meter (or the skin background) behind it that has a LeftMouseUpAction, you can add:
LeftMouseUpAction=[]
To the meter, and it will ignore clicks that are on any part of it, even if something behind it has a mouse action.
In keeping with another discussion, note that this is LeftMouseUpAction=[], NOT LeftMouseUpAction="" or LeftMouseUpAction=. We don't want NO bang, we want a valid bang that just doesn't do anything.
Just be aware that there is no such "protection" for MouseOverAction. Any and all MouseOverAction's when the cursor is on a solid pixel that is within the boundaries of any meter with the MouseOverAction will be fired.