Base Widget

BaseWidget is the base for all widget classes.

🦠 Functions

Animate

— Returns AnimationObject.

widget:Animate(Getter, Setter, EndValue, Duration, Completed, EasingFunction)
Type
Parameter
Description

Getter

Setter

EndValue

Duration

Completed

EasingFunction

RemoveFromParent

widget:RemoveFromParent()

GetParent

— Returns Widget or nil.

local ret = widget:GetParent()

SetPos

widget:SetPos(NewPos)
Type
Parameter
Description

NewPos

GetPos

— Returns Vector2D.

local ret = widget:GetPos()

SetScale

widget:SetScale(NewScale)
Type
Parameter
Description

NewScale

GetScale

— Returns Vector2D.

local ret = widget:GetScale()

SetShear

widget:SetShear(NewShear)
Type
Parameter
Description

NewShear

GetShear

— Returns Vector2D.

local ret = widget:GetShear()

SetAngle

widget:SetAngle(NewAngle)
Type
Parameter
Description

NewAngle

GetAngle

— Returns number.

local ret = widget:GetAngle()

SetOpacity

widget:SetOpacity(NewOpacity)
Type
Parameter
Description

NewOpacity

GetOpacity

— Returns number.

local ret = widget:GetOpacity()

SetVisibility

widget:SetVisibility(NewVisibility)
Type
Parameter
Description

NewVisibility

GetVisibility

— Returns WGui.Visibility.

local ret = widget:GetVisibility()

IsVisible

— Returns boolean.

local ret = widget:IsVisible()

IsHovered

— Returns boolean.

local ret = widget:IsHovered()

SetIsEnabled

widget:SetIsEnabled(IsEnabled)
Type
Parameter
Description

IsEnabled

GetIsEnabled

— Returns boolean.

local ret = widget:GetIsEnabled()

SetPadding

widget:SetPadding(Padding)
Type
Parameter
Description

Padding

GetPadding

— Returns FMargin.

local ret = widget:GetPadding()

SetToolTipText

widget:SetToolTipText(Text)
Type
Parameter
Description

Text

SetToolTipWidget

widget:SetToolTipWidget(Widget)
Type
Parameter
Description

Widget

SetCursor

widget:SetCursor(Cursor)
Type
Parameter
Description

Cursor

SetClipping

widget:SetClipping(Clipping)
Type
Parameter
Description

Clipping

SetDragKey

widget:SetDragKey(Key)
Type
Parameter
Description

Key

CreateDragDropOperation

widget:CreateDragDropOperation(Tag, Payload, DragVisual, Pivot, Offset)
Type
Parameter
Description

Tag

Payload

DragVisual

Pivot

Offset

InvalidateLayout

widget:InvalidateLayout()

ForceVolatile

widget:ForceVolatile(bForce)
Type
Parameter
Description

bForce

SetRenderPaint

widget:SetRenderPaint(RenderPaint)
Type
Parameter
Description

RenderPaint

DrawLine

widget:DrawLine(Start, End, TintColor, Thickness)
Type
Parameter
Description

Start

End

TintColor

Thickness

DrawSpline

widget:DrawSpline(Start, StartDir, End, EndDir, TintColor, Thickness)
Type
Parameter
Description

Start

StartDir

End

EndDir

TintColor

Thickness

🚀 Events

On Paint

widget.Paint = function()
    -- On Paint was called
end)

On Mouse Move

Triggered when user mouse moved within it.

widget.OnMouseMove = function(MouseEvent)
    -- On Mouse Move was called
end)

On Mouse Button Down

Triggered when a mouse button was pressed within it.

widget.OnMouseButtonDown = function(MouseEvent)
    -- On Mouse Button Down was called
end)

On Mouse Button Up

Triggered when a mouse button was released within it.

widget.OnMouseButtonUp = function(MouseEvent)
    -- On Mouse Button Up was called
end)

On Mouse Enter

Triggered when the cursor has entered it.

widget.OnMouseEnter = function(MouseEvent)
    -- On Mouse Enter was called
end)

On Mouse Leave

Triggered when the cursor has leaved it.

widget.OnMouseLeave = function(MouseEvent)
    -- On Mouse Leave was called
end)

On Mouse Wheel

Triggered when the mouse wheel is spun.

widget.OnMouseWheel = function(MouseEvent)
    -- On Mouse Wheel was called
end)

On Focus Received

Triggered when keyboard focus is given to this widget.

widget.OnFocusReceived = function()
    -- On Focus Received was called
end)

On Focus Lost

Triggered when this widget loses focus.

widget.OnFocusLost = function()
    -- On Focus Lost was called
end)

On Drag Detected

Triggered when this widget detects a drag.

widget.OnDragDetected = function(MouseEvent)
    -- On Drag Detected was called
end)

On Drag Enter

Triggered during drag and drop when the drag enters the widget.

widget.OnDragEnter = function(Tag, PayloadID)
    -- On Drag Enter was called
end)

On Drag Leave

Triggered during drag and drop when the drag leaves the widget.

widget.OnDragLeave = function(Tag, PayloadID)
    -- On Drag Leave was called
end)

On Drag Cancelled

Triggered when the user cancels the drag operation.

widget.OnDragCancelled = function(Tag, PayloadID)
    -- On Drag Cancelled was called
end)

On Drag Drop

Triggered when the user is dropping something onto a widget.

widget.OnDragDrop = function(Tag, PayloadID)
    -- On Drag Drop was called
end)

Last updated