I have both in the meters, so if I deactivate the MouseOverAction, it will allow the LeftMouseUpAction to work.
My problem is using !WriteKeyValue is writing the wrong thing. I have two buttons, one selects L-click the other selects Hover. This is used to activate a preview function. So you either L-click or Hover an icon to preview it.
This is result I want:
Button1 (L-click Selection)...
Code: Select all
MouseOverAction=[!SetVariable Preview "[##CURRENTSECTION#]"] [!UpdateMeterGroup Preview] [!SetOption #CURRENTSECTION# FontColor "#Color2#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
Code: Select all
Button2Preview=[!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
Button1 (L-click Selection)...
Code: Select all
MouseOverAction=[!SetVariable Preview "[#Variables]"] [!UpdateMeterGroup Preview] [!SetOption Variables FontColor "128,255,0"] [!UpdateMeter Variables] [!Redraw]
Button2 (Hover Selection)...
Code: Select all
MouseLeaveAction=[!SetVariable Preview ""] [!UpdateMeterGroup Preview] [!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
Code: Select all
========================================
; STYLES
========================================
[sAllIcons]
FontFace=Segoe Fluent Icons
FontSize=14
FontColor=#Color1#
AntiAlias=1
Text=[##CURRENTSECTION#]
LeftMouseUpAction=[!SetVariable Preview [##CURRENTSECTION#]] [!UpdateMeterGroup Preview] [!Redraw]
MouseOverAction=[!SetOption Variables FontColor ""] [!UpdateMeter Variables] [!Redraw]
MouseLeaveAction=[!SetVariable Preview ""] [!UpdateMeterGroup Preview] [!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
DynamicVariables=1
X=185
Y=5R
========================================
; Icon Click
========================================
[ButtonBG]
Meter=Shape
Shape=Rectangle 0,0,50,20,10 | Fill Color 0,0,0,1] | StrokeWidth 2 | StrokeColor #Color5#
X=60
Y=475
[sButton]
Shape=Rectangle 0,0,10,10,50 | Extend FillAlpha | StrokeWidth 2 | Extend StrokeAlpha
FillAlpha=FillColor #Color5#
StrokeAlpha=StrokeColor 0,0,0,1
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #Color3#"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""] [!UpdateMeter *] [!Redraw]
ToolTipText=[##CURRENTSECTION#Name]
DynamicVariables=1
Group=Button
UpdateDivider=-1
X=20r
Y=r
[Button1]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue sAllIcons MouseOverAction [##CURRENTSECTION#Preview] "#@#Meters.inc"] [!UpdateMeter *][!Redraw]
X=10r
Y=5r
[Button2]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue sAllIcons MouseOverAction [##CURRENTSECTION#Preview] "#@#Meters.inc"] [!UpdateMeter *][!Redraw]