Hello World Advanced Sample Program

' This is an advanced Hello Word example
' The text is displayed using a non-standard big font
' and it is always displayed at the center of the window
' even when the window is resized

SetFont("Verdana")
SetFontSize(50)

function OnSize()
	sText = "Hello World"
	x = Round ( GetWidth()  / 2 - GetTextWidth (sText) / 2 )
	y = Round ( GetHeight() / 2 - GetTextHeight(sText) / 2 )
	ClearScreen()
	DrawText(x, y, "Hello World")
end function

OnSize()