Code: Select all
@VERSION 9,0
@REQUIRE "RapaGUI", {Link = True}
@DISPLAY 1,{Width=500, Height=500, Color=#WHITE}
@DISPLAY 2,{Width=500, Height=500, Color=#WHITE}
Function p_EventFunc(msg)
Switch msg.action
Case "OnMouseDown":
; User clicked on a screen
DebugPrint("User clicked on screen:"..msg.ID)
Case "RapaGUI":
Switch msg.attribute
; User close program
Case "CloseRequest":
End
EndSwitch
EndSwitch
EndFunction
XML$="<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><application id=\"DemoApp\">"
XML$=XML$.."<window title=\"Window1\" id=\"Window1\" notify=\"CloseRequest\"><vgroup><hollywood display=\"1\"/></vgroup></window>"
XML$=XML$.."<window title=\"Window2\" id=\"Window2\" notify=\"CloseRequest\"><vgroup><hollywood display=\"2\"/></vgroup></window>"
XML$=XML$.."</application>"
moai.CreateApp(XML$)
InstallEventHandler({RapaGUI = p_EventFunc})
InstallEventHandler({OnMouseDown = p_EventFunc})
Repeat
WaitEvent
Forever
I'm using Hollywood 9 and RapaGUI 2.1.
Where is the mistake?