2011-08-20 14:49:54 +02:00
|
|
|
; Here we draw stuff on screen. These are the dispatch
|
|
|
|
; functions which will be called from the state dispatch
|
|
|
|
; process.
|
|
|
|
|
|
|
|
|
|
|
|
; Draw the current activated menu. This will be set from
|
|
|
|
; the dispatcher. The events are controlled by the
|
|
|
|
; HandleEventMenu() function.
|
|
|
|
Procedure DrawMenu()
|
2011-08-20 19:42:09 +02:00
|
|
|
StartDrawing(ScreenOutput())
|
|
|
|
Define Black = RGB(0, 0, 0)
|
|
|
|
Define White = RGB(255, 255, 255)
|
|
|
|
Define ActiveMenuItemColor = RGB(255, 0, 0)
|
|
|
|
|
|
|
|
DrawingFont(Font_H1)
|
|
|
|
DrawText(50, 50, *ActiveMenu\Title, white, black)
|
2011-08-20 14:49:54 +02:00
|
|
|
|
2011-08-20 19:42:09 +02:00
|
|
|
Define Offset = 0
|
|
|
|
Define FontColor = White
|
|
|
|
ForEach *ActiveMenu\Entries()
|
|
|
|
If *ActiveMenu\Entries()\Selected
|
|
|
|
FontColor = ActiveMenuItemColor
|
|
|
|
Else
|
|
|
|
FontColor = White
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
DrawingFont(Font_H2)
|
|
|
|
DrawText(50, 300+(Offset*30), *ActiveMenu\Entries()\Label, FontColor, Black)
|
|
|
|
Offset = Offset+1
|
|
|
|
Next
|
|
|
|
StopDrawing()
|
2011-08-20 14:49:54 +02:00
|
|
|
EndProcedure
|
|
|
|
|
|
|
|
|
|
|
|
Procedure DrawRunningGame()
|
2011-08-20 19:42:09 +02:00
|
|
|
StartDrawing(ScreenOutput())
|
|
|
|
Box(0, 0, 200, 200, RGB(0, 255, 0))
|
|
|
|
StopDrawing()
|
2011-08-20 18:15:38 +02:00
|
|
|
|
2011-08-20 19:42:09 +02:00
|
|
|
DisplaySprite(Tile01, 20, 20)
|
2011-08-20 17:49:22 +02:00
|
|
|
EndProcedure
|