GuiObject
Base class for 2D GUI elements with layout, rendering, input, and tween helpers.
Properties
| Property | Type | Default |
|---|---|---|
Position | UDim2 | UDim2.new(0, 0, 0, 0) |
Size | UDim2 | UDim2.new(0, 100, 0, 100) |
BackgroundColor3 | Color3 | Color3.new(1, 1, 1) |
BackgroundTransparency | number | 0 |
Visible | boolean | true |
BorderSize | number | 0 |
BorderColor | Color3 | Color3.new(0, 0, 0) |
BorderTransparency | number | 0 |
Rotation | number | 0 |
AbsolutePosition | any | nil |
Anchored | boolean | true |
AbsoluteSize | any | nil |
AutomaticSize | EnumItem | Enum.AutomaticSize.None |
ClipsDescendants | boolean | false |
ZIndex | number | 1 |
AnchorPoint | any | ZERO_V |
MouseIsInObject | boolean | false |
tilt | any | child |
corner | any | child |
stroke | any | child |
gradient | any | child |
shadow | any | child |
glow | any | child |
ripple | any | child |
vignette | any | child |
bevel | any | child |
squircle | any | child |
blend | any | child |
blur | any | child |
drawPos | any | vector.create(drawPos.X + nx * maxOffset.X, drawPos.Y + ny * maxOffset.Y, 0) |
selfBlendActive | boolean | true |
cornerRadius | any | math.min(cornerRadius, minDim / 2) |
offsetRight | any | offsetLeft |
Functions
`resolveUDim2`
`resolveBlendMode`
`drawCornerArc`
`drawRoundedRectangleEx`
`resolveAutomaticSizeAxes`
`resolvePaddingBounds`
`getContentMetrics`
`precomputeLayoutChildren`
`calculateResolvedSize`
`GetAbsoluteSize`
`getAbsoluteDrawPos`
`isMouseInRect`
`calculateDrawParams`
`resolveGuiPoint`
`getGuiMetrics`
`getGuiTweenRegistry`
`isTweenBusy`
`playGuiTween`
`resolveCornerRadii`
`isDefaultCornerValue`
`resolve`
`isDifferent`
`appendPoint`
`appendSquircleArc`
`buildSquirclePoints`
`drawSquircleFilled`
`drawSquircleOutline`
`getRoundedHorizontalInset`
`edgeInset`
`drawShadow`
`drawShapeFill`
`drawShapeOutline`
`drawGlow`
`drawVignette`
`drawBevel`
`drawRipple`
`createSignals`
`GetBounds`
Returns the absolute top-left position and size of the GUI object.
`GetCenter`
Returns the absolute center point of the GUI object.
`IsPointInside`
Returns whether a screen-space point is inside the GUI object bounds.
`GetRelativePoint`
Converts a screen-space point into coordinates relative to the GUI object.
`CancelGuiTweens`
Cancels active GUI tweens started by this object.
`TweenPosition`
Tweens the Position property to a target value.
`TweenSize`
Tweens the Size property to a target value.
`TweenSizeAndPosition`
Tweens Size and Position together.
`IsParentGuiContainer`
Returns whether an object is parented directly under a GUI container.
`calculatePositions`
Updates absolute position, absolute size, and hover state without drawing.
resolveUDim2
Arguments
val, parentDimReturns
resolveBlendMode
Arguments
raylib, valueReturns
drawCornerArc
Arguments
lib, cx, cy, radius, angleStart, angleEnd, colorReturns
drawRoundedRectangleEx
Arguments
lib, x, y, w, h, tl, tr, bl, br, colorReturns
resolveAutomaticSizeAxes
Arguments
modeReturns
resolvePaddingBounds
Arguments
object, parentSizeReturns
getContentMetrics
Arguments
object, sizeReturns
precomputeLayoutChildren
Arguments
object, lib, dt, structs, rendererReturns
calculateResolvedSize
Arguments
object, parentSize, lib, dt, structs, renderer, depthReturns
GetAbsoluteSize
Arguments
object, lib, dt, structs, renderer, depthReturns
getAbsoluteDrawPos
Arguments
object, lib, dt, structs, renderer, depthReturns
isMouseInRect
Arguments
mousePos, drawPos, sizeReturns
calculateDrawParams
Arguments
object, lib, dt, structs, renderer, depthReturns
resolveGuiPoint
Arguments
pointReturns
getGuiMetrics
Arguments
objectReturns
getGuiTweenRegistry
Arguments
objectReturns
isTweenBusy
Arguments
tweenReturns
playGuiTween
Arguments
object,
propertyNames,
properties,
easingDirection,
easingStyle,
duration,
override,
callbackReturns
resolveCornerRadii
Arguments
corner, minDimReturns
isDefaultCornerValue
Arguments
propReturns
resolve
Arguments
propReturns
isDifferent
Arguments
propReturns
appendPoint
Arguments
points, x, yReturns
appendSquircleArc
Arguments
points, cx, cy, radius, sx, sy, angleStart, angleEnd, exponent, skipFirstReturns
buildSquirclePoints
Arguments
x, y, w, h, tl, tr, bl, br, exponentReturns
drawSquircleFilled
Arguments
lib, x, y, w, h, tl, tr, bl, br, exponent, colorReturns
drawSquircleOutline
Arguments
lib, x, y, w, h, tl, tr, bl, br, exponent, thickness, colorReturns
getRoundedHorizontalInset
Arguments
localY, height, radius, exponentReturns
edgeInset
Arguments
distanceToEdgeReturns
drawShadow
Arguments
lib, structs, object, shadow, drawPos, size, corner, squircleReturns
drawShapeFill
Arguments
lib, structs, object, modifier, x, y, w, h, colorReturns
drawShapeOutline
Arguments
lib, structs, object, modifier, x, y, w, h, thickness, colorReturns
drawGlow
Arguments
lib, structs, object, glow, drawPos, size, shapeModifierReturns
drawVignette
Arguments
lib, structs, object, vignette, drawPos, size, shapeModifierReturns
drawBevel
Arguments
lib, structs, object, bevel, drawPos, size, shapeModifierReturns
drawRipple
Arguments
lib, raylib, ripple, object, drawPos, size, dtReturns
createSignals
Arguments
Returns
GetBounds
Returns the absolute top-left position and size of the GUI object.
Arguments
self: tableReturns
Vector2, Vector2GetCenter
Returns the absolute center point of the GUI object.
Arguments
self: tableReturns
Vector2IsPointInside
Returns whether a screen-space point is inside the GUI object bounds.
Arguments
self: table, point: Vector2Returns
booleanGetRelativePoint
Converts a screen-space point into coordinates relative to the GUI object.
Arguments
self: table, point: Vector2Returns
Vector2?CancelGuiTweens
Cancels active GUI tweens started by this object.
Arguments
self: tableReturns
TweenPosition
Tweens the Position property to a target value.
Arguments
self: table, endPosition: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?Returns
boolean, anyTweenSize
Tweens the Size property to a target value.
Arguments
self: table, endSize: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?Returns
boolean, anyTweenSizeAndPosition
Tweens Size and Position together.
Arguments
self: table, endSize: UDim2, endPosition: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?Returns
boolean, anyIsParentGuiContainer
Returns whether an object is parented directly under a GUI container.
Arguments
object: tableReturns
booleancalculatePositions
Updates absolute position, absolute size, and hover state without drawing.
Arguments
lib: number, object: table, dt: number, structs: table, renderer: numberReturns
Vector3, Vector3API
instance:resolveUDim2(val, parentDim)
instance:resolveBlendMode(raylib, value)
instance:drawCornerArc(lib, cx, cy, radius, angleStart, angleEnd, color)
instance:drawRoundedRectangleEx(lib, x, y, w, h, tl, tr, bl, br, color)
instance:resolveAutomaticSizeAxes(mode)
instance:resolvePaddingBounds(object, parentSize)
instance:getContentMetrics(object, size)
instance:precomputeLayoutChildren(object, lib, dt, structs, renderer)
instance:calculateResolvedSize(object, parentSize, lib, dt, structs, renderer, depth)
instance:GetAbsoluteSize(object, lib, dt, structs, renderer, depth)
instance:getAbsoluteDrawPos(object, lib, dt, structs, renderer, depth)
instance:isMouseInRect(mousePos, drawPos, size)
instance:calculateDrawParams(object, lib, dt, structs, renderer, depth)
instance:resolveGuiPoint(point)
instance:getGuiMetrics(object)
instance:getGuiTweenRegistry(object)
instance:isTweenBusy(tween)
instance:playGuiTween(object,
propertyNames,
properties,
easingDirection,
easingStyle,
duration,
override,
callback)
instance:resolveCornerRadii(corner, minDim)
instance:isDefaultCornerValue(prop)
instance:resolve(prop)
instance:isDifferent(prop)
instance:appendPoint(points, x, y)
instance:appendSquircleArc(points, cx, cy, radius, sx, sy, angleStart, angleEnd, exponent, skipFirst)
instance:buildSquirclePoints(x, y, w, h, tl, tr, bl, br, exponent)
instance:drawSquircleFilled(lib, x, y, w, h, tl, tr, bl, br, exponent, color)
instance:drawSquircleOutline(lib, x, y, w, h, tl, tr, bl, br, exponent, thickness, color)
instance:getRoundedHorizontalInset(localY, height, radius, exponent)
instance:edgeInset(distanceToEdge)
instance:drawShadow(lib, structs, object, shadow, drawPos, size, corner, squircle)
instance:drawShapeFill(lib, structs, object, modifier, x, y, w, h, color)
instance:drawShapeOutline(lib, structs, object, modifier, x, y, w, h, thickness, color)
instance:drawGlow(lib, structs, object, glow, drawPos, size, shapeModifier)
instance:drawVignette(lib, structs, object, vignette, drawPos, size, shapeModifier)
instance:drawBevel(lib, structs, object, bevel, drawPos, size, shapeModifier)
instance:drawRipple(lib, raylib, ripple, object, drawPos, size, dt)
instance:createSignals()
instance:GetBounds(self: table): Vector2, Vector2
instance:GetCenter(self: table): Vector2
instance:IsPointInside(self: table, point: Vector2): boolean
instance:GetRelativePoint(self: table, point: Vector2): Vector2?
instance:CancelGuiTweens(self: table)
instance:TweenPosition(self: table, endPosition: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?): boolean, any
instance:TweenSize(self: table, endSize: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?): boolean, any
instance:TweenSizeAndPosition(self: table, endSize: UDim2, endPosition: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?): boolean, any
instance:IsParentGuiContainer(object: table): boolean
instance:calculatePositions(lib: number, object: table, dt: number, structs: table, renderer: number): Vector3, Vector3