Koui's main class.
Static variables
staticread onlyfont:Font
The theme's root kha.Font object (for initialization of components).
Used internally only.
staticread onlyfontSize:Int
The theme's root font size (for initialization of components). Used internally only.
Static methods
staticinlineadd(element:Element, anchor:Anchor = TopLeft):Void
Adds an element to be drawn.
Parameters:
element | The element  | 
|---|---|
anchor | The anchor position of the new element.  | 
staticgetElementAtPosition(x:Int, y:Int):Null<Element>
Returns the topmost element at the given position. If no element exists
at that position, null is returned.
Parameters:
x | The position's x coordinate  | 
|---|---|
y | The position's y coordinate  | 
Returns:
The element at the given position or null if not found
staticinit(done:() ‑> Void):Void
Initializes Koui. Call this in your application's initialization method.
Parameters:
done | Called after Koui successfully initialized and loaded all assets.  | 
|---|
staticinlineremove(element:Element):Void
Removes an element from the drawing list.
Parameters:
element | The element  | 
|---|
staticrender(g2:Graphics):Void
Main drawing method responsible for drawing everything. Call this in you render loop.
Parameters:
g2 | The   | 
|---|
staticinlinesetPadding(left:Int, right:Int, top:Int, bottom:Int):Void
Sets the padding values of the default AnchorPane.
Parameters:
left | The left padding  | 
|---|---|
right | The right padding  | 
top | The top padding  | 
bottom | The bottom padding  |