Procedure HagInit(screenw: Integer, screenh: Integer, index: Integer=0)
Set screenw to the screen width and screenh to the screen height.
Optionally, specify a value for index. This causes hag to start creating elements with a certain sprite z-index. For example, if you have a background sprite, you would specify an index of 1 to cause hag to appear above this layer.
HagInit is a vital command that sets some crucial variables, clears old hag log files, sets default preferences, sets some sane default theme styles, initialises logging and initialises millisecond-based timers.
If you have moved or renamed the hag directory so that it is not available at the default path of "hag/", you must first use the procedure HagBaseDir to tell hag where the directory is. With HagBaseDir as the only exception, HagInit is always the first hag command you will call.
Then, before loading any hag GUI elements, you should first load a theme with HagLoadGuiTheme.
// SetUp Your Controls...
While Not KeyDown(VK_ESCAPE)
// Update Your Controls...
You can also contact me directly - I make an effort to reply to every e-mail.