Hello World Template


Tweet monkey-x code-archives miscellaneous
(Posted 9 months ago) RonTek

Starter or Hello World template for Monkey-X

Strict

Import mojo

Function Main:Int()
    New HelloWorld
    Return True
End

Class HelloWorld Extends App

    Field text:String = "Hello Monkey-X World"

    Method OnCreate:Int()
        Return True
    End

    Method OnUpdate:Int()
        Return True
    End

    Method OnRender:Int()
        Cls
        DrawText(text, DeviceWidth() / 2 - TextWidth(text)/2, DeviceHeight() / 2)       
        Return True
    End
End

Reply To Topic (minimum 10 characters)

Please log in to reply