GuiObject
Base class for 2D GUI elements: layout, absolute positioning, and mouse hit-testing only.
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 |
AbsolutePosition | any | nil |
AbsoluteSize | any | nil |
AutomaticSize | EnumItem | Enum.AutomaticSize.None |
ClipsDescendants | boolean | false |
ZIndex | number | 1 |
AnchorPoint | any | ZERO_V |
MouseIsInObject | boolean | false |
Functions
`applySizeConstraints`
`resolveUDim2`
`toArgonColor`
`resolveAutomaticSizeAxes`
`resolvePaddingBounds`
`getContentMetrics`
`precomputeLayoutChildren`
`calculateResolvedSize`
`GetAbsoluteSize`
`getAbsoluteDrawPos`
`isMouseInRect`
`calculateDrawParams`
`resolveGuiPoint`
`getGuiMetrics`
`getMousePos`
`makeRect`
`resolveModifierRadius`
`getGuiShape`
`createSignals`
`UIBackdrop`
`UIShadow`
`UISquircle`
`UIStroke`
`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.
`render`
Renders this GUI object's background, updates absolute bounds and hover state.
`IsParentGuiContainer`
Returns whether an object is parented directly under a GUI container.
`renderChildren`
Renders visible GUI children, applying ClipsDescendants as a plain rect clip.
`calculatePositions`
Updates absolute position, absolute size, and hover state without drawing.
applySizeConstraints
Arguments
object, resolvedSizeReturns
resolveUDim2
Arguments
val, parentDimReturns
toArgonColor
Arguments
color3, transparencyReturns
resolveAutomaticSizeAxes
Arguments
modeReturns
resolvePaddingBounds
Arguments
object, parentSizeReturns
getContentMetrics
Arguments
object, sizeReturns
precomputeLayoutChildren
Arguments
object, window, dt, rendererReturns
calculateResolvedSize
Arguments
object, parentSize, window, dt, renderer, depthReturns
GetAbsoluteSize
Arguments
object, window, dt, renderer, depthReturns
getAbsoluteDrawPos
Arguments
object, window, dt, renderer, depthReturns
isMouseInRect
Arguments
mousePos, drawPos, sizeReturns
calculateDrawParams
Arguments
object, window, dt, renderer, depthReturns
resolveGuiPoint
Arguments
pointReturns
getGuiMetrics
Arguments
objectReturns
getMousePos
Arguments
windowReturns
makeRect
Arguments
drawPos, size, color, isOutlineReturns
resolveModifierRadius
Arguments
modifierReturns
getGuiShape
Arguments
UICorner, UISquircleReturns
createSignals
Arguments
Returns
UIBackdrop
Arguments
window, rect, modifier, isSquircle, radius, exponentReturns
UIShadow
Arguments
window, drawPos, size, modifier, isSquircle, radius, exponentReturns
UISquircle
Arguments
window, rect, radius, exponent, strokeWidthReturns
UIStroke
Arguments
window, rect, UICorner, UISquircle, strokeReturns
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?render
Renders this GUI object's background, updates absolute bounds and hover state.
Arguments
window: table, object: table, dt: number, renderer: tableReturns
vector?, vector?IsParentGuiContainer
Returns whether an object is parented directly under a GUI container.
Arguments
object: tableReturns
booleanrenderChildren
Renders visible GUI children, applying ClipsDescendants as a plain rect clip.
Arguments
window: table, object: table, dt: number, renderer: tableReturns
calculatePositions
Updates absolute position, absolute size, and hover state without drawing.
Arguments
window: table, object: table, dt: number, renderer: tableReturns
vector, vectorAPI
instance:applySizeConstraints(object, resolvedSize)
instance:resolveUDim2(val, parentDim)
instance:toArgonColor(color3, transparency)
instance:resolveAutomaticSizeAxes(mode)
instance:resolvePaddingBounds(object, parentSize)
instance:getContentMetrics(object, size)
instance:precomputeLayoutChildren(object, window, dt, renderer)
instance:calculateResolvedSize(object, parentSize, window, dt, renderer, depth)
instance:GetAbsoluteSize(object, window, dt, renderer, depth)
instance:getAbsoluteDrawPos(object, window, dt, renderer, depth)
instance:isMouseInRect(mousePos, drawPos, size)
instance:calculateDrawParams(object, window, dt, renderer, depth)
instance:resolveGuiPoint(point)
instance:getGuiMetrics(object)
instance:getMousePos(window)
instance:makeRect(drawPos, size, color, isOutline)
instance:resolveModifierRadius(modifier)
instance:getGuiShape(UICorner, UISquircle)
instance:createSignals()
instance:UIBackdrop(window, rect, modifier, isSquircle, radius, exponent)
instance:UIShadow(window, drawPos, size, modifier, isSquircle, radius, exponent)
instance:UISquircle(window, rect, radius, exponent, strokeWidth)
instance:UIStroke(window, rect, UICorner, UISquircle, stroke)
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:render(window: table, object: table, dt: number, renderer: table): vector?, vector?
instance:IsParentGuiContainer(object: table): boolean
instance:renderChildren(window: table, object: table, dt: number, renderer: table)
instance:calculatePositions(window: table, object: table, dt: number, renderer: table): vector, vector