Skip to content

Commit

Permalink
Create Beginners - Quit End Terminate App.monkey2
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakz001 committed Jul 3, 2016
1 parent 2c65e19 commit 5dcde44
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Beginners - Quit End Terminate App.monkey2
@@ -0,0 +1,24 @@
#Import "<std>"
#Import "<mojo>"

Using std..
Using mojo..

Class MyWindow Extends Window

Method New()
End Method

Method OnRender( canvas:Canvas ) Override
App.RequestRender() ' Activate this method
' if key escape then quit
If Keyboard.KeyReleased(Key.Escape) Then App.Terminate()
End Method

End Class

Function Main()
New AppInstance
New MyWindow
App.Run()
End Function

0 comments on commit 5dcde44

Please sign in to comment.