Code: Select all
@VERSION 5,2
@REQUIRE "MUIRoyale", {Link = True}
@FILE 1, "Daysleeper.xml"
@APPTITLE "Daysleeper"
@DISPLAY {Hidden = True}
Function p_EventFunc(msg)
Switch msg.Class
Case "Window":
Switch msg.Attribute
Case "CloseRequest":
End
EndSwitch
Case "Button":
Switch msg.Attribute
Case "Pressed":
Switch msg.ID
Case "bt1":
x=x+30
Case "bt2":
x=x-30
EndSwitch
EndSwitch
Default:
;time$ = GetTime(True)
mui.Set("tx_time", "contents", GetTime(True))
EndSwitch
EndFunction
InstallEventHandler({MUIRoyale = p_EventFunc})
mui.CreateGUI(ReadString(1))
; main loop!
Repeat
WaitEvent
Forever
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<application base="DAYSLEEPER">
<window title="Daysleeper" muiid="MAIN" notify="closerequest">
<vgroup>
<hgroup frame="text">
<rectangle/>
<text id="tx_time" preparse="\33c">00:00:00</text>
<rectangle/>
</hgroup>
<hgroup>
<button id="bt1" notify="pressed">button1</button>
<button id="bt2" notify="pressed">button2</button>
</hgroup>
</vgroup>
</window>
</application>