Heres the code:
Code: Select all
@SCREEN {Mode = "FakeFullScreen"}
@DISPLAY {Width = 1920, Height = 1080, Borderless = True, ScaleMode = #SCALEMODE_AUTO, FitScale=True}
EnableLayers()
Function black(msg)
Switch msg.action
Case "OnMouseOver":
DebugPrint("User moved mouse over BLACK button", msg.id)
EndSwitch
EndFunction
Function white(msg)
Switch msg.action
Case "OnMouseOver":
DebugPrint("User moved mouse over WHITE button", msg.id)
EndSwitch
EndFunction
SetFillStyle(#FILLCOLOR)
CreateBrush(1, 500, 500, $010101)
CreateBrush(2, 800, 800, $FFFFFF)
DisplayBrush(1, #CENTER, #CENTER, {name="white"})
DisplayBrush(2, #CENTER, #CENTER, {name="black"})
LayerToFront(2)
blackevt = {OnMouseUp = black, OnMouseOver = black,
OnRightMouseUp = black}
whiteevt = {OnMouseOver = white}
MakeButton(1, #LAYERBUTTON, "black", True, False, blackevt)
MakeButton(2, #LAYERBUTTON, "white", True, True, whiteevt)
Repeat
WaitEvent()
Forever
What happens is that if you switch
Code: Select all
DisplayBrush(1, #CENTER, #CENTER, {name="white"})
DisplayBrush(2, #CENTER, #CENTER, {name="black"})
Code: Select all
DisplayBrush(1, #CENTER, #CENTER, {name="black"})
DisplayBrush(1, #CENTER, #CENTER, {name="white"})
It reacts strangely.
Im not even sure what is the actual problem that happens here.
But as far as i understand, in one or the other case, the black square should be seeable.
However, it never is.
But what strangely however happens is that in the first version black squares button however reacts (If you keep moving mouse around it tells you "User moved mouse over BLACK button" and "User moved mouse over WHITE button"), while in second version it reacts to white button only (losts of "User moved mouse over WHITE button"-text only).
Am i misunderstanding something here, or is this a bug, and what is the bug?