Widget

A widget

Constructors

this
this(string type)

Base widget instance requires type name

Members

Functions

area
vec4 area()

Area of the widget

calculatedPosition
vec2 calculatedPosition()

Gets the calculated position of the widget

changeParent
void changeParent(Widget newParent)

Changes the parent of a widget to the specified other widget.

draw
void draw()

Draw the widget

onDraw
void onDraw()

Code run when drawing

onUpdate
void onUpdate()

Code run when updating the widget

parent
Widget parent()

The parent widget

scissorArea
vec4i scissorArea()

Area in which the widget cuts out child widgets

toString
string toString()

Gets this widget as a string

update
void update()

Update the widget

Variables

position
vec2 position;

The position of the widget

visible
bool visible;

Whether the widget is visible

Meta