gambas-source-code/app/template/sdl/.src/MMain.module
Benoît Minisini 8cc489787c [DEVELOPMENT ENVIRONMENT]
* NEW: Update french translation.

[TEMPLATES]
* NEW: Some new templates.


git-svn-id: svn://localhost/gambas/trunk@7323 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-09-18 02:47:43 +00:00

40 lines
593 B
Text

' Gambas module file
Private $hWindow As Window
Public Sub Main()
$hWindow = New Window As "Window"
With $hWindow
.Resize(640, 480)
.Resizable = False
.Show
.FrameRate = 60
End With
End
Public Sub Window_Draw()
Dim H As Integer
H = Font.DefaultHeight * 4
Draw.Clear
Draw.Font.Size = H
Draw.Text("Gambas", 0, 0)
Draw.Text(CStr($hWindow.FrameCount), 0, H)
End
Public Sub Window_KeyPress()
Select Case Key.Code
Case Key.F1
$hWindow.FullScreen = Not $hWindow.FullScreen
Case Key.Esc
$hWindow.Close
End Select
End