Didnt really want to touch it until I knew what the actual problem was.
So Andreas, what about that possibility to add some extra info to button?
In way that there could be called something like self.type for example.
So that it could be used in way of:
Code: Select all
function buttonfunctions(msg)
switch msg.action
case OnMouseOver:
Switch self.type
case 1:
code
case 2:
code
endswitch
endswitch
endfunction
That when you make the button you could be keeping table of buttontypes, and then keep changing their type and call it inside a function.
ie.
Code: Select all
function buttonfunctions(msg)
type = currentbuttons[msg.id]
...
endfunction
evttable={OnMouseOver=buttonfunctions()}
currentbuttons={}
makebutton(1... evttable)
makebutton(2... evttable)
currentbuttons[1] = 1
currentbuttons[2] = 0
WaitEvent()