UI: container for single UIWidget, handles events propagation to widget, drawing restrictions etc.
UIWidget: toplevel class for widget
UIButton: inherits from UIWidgetUIFrame: inherits from UIWidget
Methods in cursive should be overriden only if you really know what you are doing!Methods in bold should be overriden for custom logic
UI:
constructor(x, y, width, height) - defines available box to draw inside window
update(dt) - updates UI
draw() - draws UI accor
getHandlers() - returns event handlers which should be connected to environment callbacks
getRawCursor
UIWidget:
constructor(style, flags)
style {} - table defining display. Changes to origin, size, margin and simmilar trigger layoutReload
flags {} - table defining behaviour
addWidget(widget) - adds widget as a child, will be displayed in ascending z-index
updater(self, dt, ...) - defines how widget (only self) is updated
renderer(self, ...) - defines how widget (only self) is rendered
update(dt, ...) - defines how the widget and subtree is updated.
draw(...) - defines how this subtree is drawn.
getHovered() - returns topmost hovered widget
reloadLayoutSelf() - reloads and recalculates self
reloadLayout(doReload) - recalculates sizes etc. of the subtree
reload() - reloads widget to default state (drop focus, clear buffers, reset scroll etc.)
UI
: container for single UIWidget, handles events propagation to widget, drawing restrictions etc.UIWidget
: toplevel class for widgetUIButton
: inherits fromUIWidget
UIFrame
: inherits fromUIWidget
Methods in cursive should be overriden only if you really know what you are doing! Methods in bold should be overriden for custom logic
UI:
UIWidget:
{}
- table defining display. Changes to origin, size, margin and simmilar trigger layoutReload{}
- table defining behaviourevents: