Hi!
I found something that I think is a bug. Please follow this tour:
- Run the makebutton example from the Hollywood user guide (Copy and paste from the bottom of this mail.)
- Click on the red button. It said: "User left-clicked button 1"
- Click on the blue button. It said: "User left-clicked button 2"
- Press and hold the left button on the red area and move the pointer out of it. Release the left button.
- Do it with the blue area
The last two action correctly did not received any "left-click".
- Press and hold the left mouse button on the red area and release it at the blue area.
Correctly there is no "left-click" message.
Now here comes the tricky part:
- Press and hold the left mouse button on the blue area and release it at the red area.
Here it is! It said that the "User left-clicked button 1", which is faulty I think.
Here is the script:
Code: Select all
@display { Mode = "windowed", Desktop=false, Borderless = False, Sizeable = False, Title = "Test", X = #CENTER, Y = #CENTER, Width = 640, Height = 512 }
Function p_MyFunc(msg)
Switch msg.action
Case "OnMouseUp":
DebugPrint("User left-clicked button", msg.id)
Case "OnMouseOver":
DebugPrint("User moved mouse over button", msg.id)
Case "OnRightMouseUp":
DebugPrint("User right-clicked button", msg.id)
EndSwitch
EndFunction
; draw the buttons
Box(0, 0, 100, 100, #RED)
Box(200, 200, 100, 100, #BLUE)
; install them
evtmatch = {OnMouseUp = p_MyFunc, OnMouseOver = p_MyFunc, OnRightMouseUp = p_MyFunc}
MakeButton(1, #SIMPLEBUTTON, 0, 0, 100, 100, evtmatch)
MakeButton(2, #SIMPLEBUTTON, 200, 200, 100, 100, evtmatch)
Repeat
WaitEvent
Forever
EndFunction