Code: Select all
@REQUIRE "RapaGUI"
@DISPLAY {Color=#WHITE, Layers=True, Width=800, Height=600, ScaleMode=#SCALEMODE_LAYER, FitScale=True, KeepProportions=True, Hidden=False}
moai.CreateApp([[<application id="app">
<window id="Main" Title="Test" closegadget="true" open="true">
<vgroup>
<hollywood display="1"/>
</vgroup>
</window>
</application>]])
Function p_TestButtonFunc(msg)
Switch msg.action
Case "OnMouseOver":
DebugPrint("Over")
Case "OnMouseOut":
DebugPrint("Out")
EndSwitch
EndFunction
TestButtonTable={OnMouseOver=p_TestButtonFunc, OnMouseOut=p_TestButtonFunc}
SetFillStyle(#FILLCOLOR)
Box(20, #CENTER, 200, 200, #RED, {Name="Test"})
MakeButton(1, #LAYERBUTTON, "Test", TestButtonTable)
;MakeButton(1, #SIMPLEBUTTON, 20, #CENTER, 200, 200, TestButtonTable)
Repeat
WaitEvent
Forever