Gui Basics

Pyro provides building blocks or gui objects to create a visual interface.

You must always create a layer first and the layer can contain the gui objects.

Gui objects can be various objects like a label, button, image, progressbar, scrollbox, etc.

Each gui object can have 5 render states ( Idle, Selected, RollOver, Down and Ghost )

Each render state can have its own alpha, blendmode, color, size, etc.

Creating a simple button may look something like this:

layer=New GuiLayer( Self ) layer.ClearColor=New Color( 0,.25,0,1 )

button=New GuiButton button.Layer=layer button.Location=New Vec2f( 320,240 )

button.Surface.DrawData( GuiState.Idle ).Image=Image.Load( "asset::button.png" )

button.Label.Text="Click me" button.Label.Font=Font.Load( "asset::comici.ttf",32 )