π₯οΈ BaseWidget
BaseWidget is the base for all WGUI widget classes.
π¦ Functions
SetMouseEnabled
Sets whether or not the mouse should be enabled for this widget.
Type | Parameter | Description |
---|---|---|
IsEnabled |
GetMouseEnabled
Returns whether or not the mouse should be enabled for this widget.
β Returns boolean.
SetKeyboardEnabled
Sets whether or not the keyboard should be enabled for this widget.
Type | Parameter | Description |
---|---|---|
IsEnabled |
GetKeyboardEnabled
Returns whether or not the keyboard should be enabled for this widget.
β Returns boolean.
SetForceInputRules
Sets whether or not the widget should force the input rules to be recalculated no matter if it is visible or not.
Type | Parameter | Description |
---|---|---|
Force |
GetForceInputRules
β Returns boolean.
SetTranslation
Sets the render translation of the widget.
Type | Parameter | Description |
---|---|---|
NewTranslation |
GetTranslation
Gets the render translation of the widget.
β Returns Vector2D.
SetScale
Sets the scale of the widget.
Type | Parameter | Description |
---|---|---|
NewScale |
GetScale
Gets the scale of the widget.
β Returns Vector2D.
GetDesiredSize
Returns the desired size of the widget.
β Returns Vector2D.
SetShear
Sets the shear of the widget.
Type | Parameter | Description |
---|---|---|
NewShear |
GetShear
Gets the shear of the widget.
β Returns Vector2D.
SetAngle
Sets the angle of the widget.
Type | Parameter | Description |
---|---|---|
NewAngle |
GetAngle
Gets the angle of the widget.
β Returns number.
SetPivot
Sets the pivot of the widget.
Type | Parameter | Description |
---|---|---|
NewPivot |
GetPivot
Gets the pivot of the widget.
β Returns Vector2D.
SetOpacity
Sets the opacity of the widget.
Type | Parameter | Description |
---|---|---|
NewOpacity |
GetOpacity
Gets the opacity of the widget.
β Returns number.
SetColor
Sets the tint of the widget, this affects all children.
Type | Parameter | Description |
---|---|---|
Color |
GetColor
Gets the tint of the widget.
β Returns Color.
SetForegroundColor
Sets the foreground color of the widget.
CreateAnimationObject
β Returns AnimationObject.
Type | Name | Default |
---|---|---|
GetterFunction | ||
SetterFunction | ||
EndValue | ||
Duration | ||
OnCompleted? | ||
AutoDestroy? |
| |
EasingFunction? |
RemoveFromParent
Removes the widget from its parent panel.
GetParent
Returns the parent panel of the widget.
β Returns PanelWidget or nil.
IsChildOfParent
Returns whether the widget is a child of the specified parent class.
β Returns boolean.
Type | Parameter | Description |
---|---|---|
ParentClass |
SetVisibility
Sets the visibility of the widget.
Type | Parameter | Description |
---|---|---|
NewVisibility |
GetVisibility
Gets the visibility of the widget.
β Returns WGUIVisibility.
IsVisible
Returns true if the widget is currently visible.
β Returns boolean.
IsHitTestable
Returns true if the widget can be interacted with.
β Returns boolean.
IsHovered
Returns true if the widget is currently being hovered.
β Returns boolean.
IsRendered
Returns true if the widget is currently rendered.
β Returns boolean.
SetIsEnabled
Sets the current enabled status of the widget.
Type | Parameter | Description |
---|---|---|
IsEnabled |
GetIsEnabled
Gets the current enabled status of the widget.
β Returns boolean.
SetPadding
Sets the padding of the widget, putting a larger gap between the widget border and it's root widget.
GetPadding
Gets the padding of the widget.
β Returns Margin.
SetToolTipText
Sets the tooltip text of the widget.
Type | Parameter | Description |
---|---|---|
Text |
GetToolTipText
Gets the tooltip text of the widget.
β Returns string.
SetToolTipWidget
Sets the tooltip widget of the widget.
Type | Parameter | Description |
---|---|---|
Widget |
GetToolTipWidget
Gets the tooltip widget of the widget.
β Returns Widget
SetCursor
Sets the cursor to show over the widget.
Type | Parameter | Description |
---|---|---|
Cursor |
GetCursor
Gets the cursor to show over the widget.
β Returns CursorType.
SetClipping
Sets the clipping state of the widget.
Type | Parameter | Description |
---|---|---|
Clipping |
GetClipping
Gets the clipping state of the widget.
β Returns WidgetClipping.
SetSnapToPixel
Sets whether or not the widget will draw snapped to the nearest pixel.
Type | Parameter | Description |
---|---|---|
PixelSnapping |
GetSnapToPixel
Gets whether or not the widget will draw snapped to the nearest pixel.
β Returns PixelSnapping.
SetDragKey
Sets the input key that will be used to drag the widget.
Type | Parameter | Description |
---|---|---|
Key |
GetDragKey
Gets the input key that will be used to drag the widget.
β Returns string.
CreateDragDropOperation
Creates a new drag & drop operation. Should be called inside a OnDragDetected event.
Type | Parameter | Description |
---|---|---|
DragVisual | ||
Payload | ||
MetaData | ||
Pivot | ||
Offset |
CancelDragDropOperation
Cancels any ongoing drag & drop operation.
GetIsDragDropping
Returns true if the widget is currently being dragged.
β Returns boolean.
InvalidateLayoutAndVolatility
Invalidates the widget from the view of a layout caching widget that may own this widget. It will force the owning widget to redraw and cache children on the next paint pass.
ForceVolatile
Sets the forced volatility of the widget.
Type | Parameter | Description |
---|---|---|
bForce |
ForceLayoutPrepass
Forces a pre-pass. A pre-pass caches the desired size of the widget hierarchy owned by this widget.
BindDispatcher
β Returns function (the subscribed callback itself).
UnbindDispatcher
π Events
Mouse Button Down
Type | Parameter | Description |
---|---|---|
PointerEvent |
Mouse Button Up
Type | Parameter | Description |
---|---|---|
PointerEvent |
Mouse Move
Type | Parameter | Description |
---|---|---|
PointerEvent |
Mouse Enter
Type | Parameter | Description |
---|---|---|
PointerEvent |
Mouse Leave
Type | Parameter | Description |
---|---|---|
PointerEvent |
Mouse Wheel
Type | Parameter | Description |
---|---|---|
PointerEvent |
Mouse Double Click
Type | Parameter | Description |
---|---|---|
PointerEvent |
Focus Received
Focus Lost
Drag Detected
Type | Parameter | Description |
---|---|---|
PointerEvent |
Drag Cancelled
Drop
Last updated