I tried it today and it worked, I did not know it was possible.
I see that in all game examples everybody wants to use #Import instead, perhaps this helps with deployment.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#Import "<std>" #Import "<mojo>" Using std.. Using mojo.. Class MyWindow Extends Window Field _image:Image Method New(title:String="Simple mojo app", width:Int=640, height:Int=480, flags:WindowFlags=Null) Super.New(title, width, height, flags) _image = Image.Load("-> image path here <-") End Method OnRender( canvas:Canvas ) Override App.RequestRender() canvas.DrawImage(_image, 0, 0) End End Function Main() New AppInstance New MyWindow App.Run() End |