Using panels as buttons
Using OnMouseEnter/Leave to trigger the subroutines as below with variable per button (there are 112 buttons)
Using "highlight" subroutine to highlight them a specific colour (which also reads their current colour)
Using "unhighlight" subroutine to paint the panel back to the colour I got previously
So like this:
Code: Select all
Let>d=0
While>d<112
Add>d,1
AddDialogHandler>Dialog1,Panel%d%,OnMouseDown,MDOWN(%d%) // this is for checking left or right click
AddDialogHandler>Dialog1,Panel%d%,OnMouseEnter,OHighLight(%d%)
AddDialogHandler>Dialog1,Panel%d%,OnMouseLeave,OUnHighLight(%d%)
EndWhile
Code: Select all
SRT>OHighLight
Let>hbutt=%OHighLight_Var_1%
GetDialogProperty>Dialog1,Panel%hbutt%,Color,buttcol
SetDialogProperty>Dialog1,Panel%hbutt%,Color,uhcolor
// MSG>H %hbutt%
END>OHighLight
SRT>OUnHighLight
Let>uhbutt=%OUnHighLight_Var_1%
SetDialogProperty>Dialog1,Panel%uhbutt%,Color,buttcol
// MSG>U %uhbutt%
END>OUnHighLight
It is not a huge thing but the logic here is beating me.