Kinemium Docs

GuiObject

Base class for 2D GUI elements: layout, absolute positioning, and mouse hit-testing only.

Properties

PropertyTypeDefault
PositionUDim2UDim2.new(0, 0, 0, 0)
SizeUDim2UDim2.new(0, 100, 0, 100)
BackgroundColor3Color3Color3.new(1, 1, 1)
BackgroundTransparencynumber0
Visiblebooleantrue
AbsolutePositionanynil
AbsoluteSizeanynil
AutomaticSizeEnumItemEnum.AutomaticSize.None
ClipsDescendantsbooleanfalse
ZIndexnumber1
AnchorPointanyZERO_V
MouseIsInObjectbooleanfalse

Functions


applySizeConstraints

Arguments

object, resolvedSize

Returns

This function returns nothing.

resolveUDim2

Arguments

val, parentDim

Returns

This function returns nothing.

toArgonColor

Arguments

color3, transparency

Returns

This function returns nothing.

resolveAutomaticSizeAxes

Arguments

mode

Returns

This function returns nothing.

resolvePaddingBounds

Arguments

object, parentSize

Returns

This function returns nothing.

getContentMetrics

Arguments

object, size

Returns

This function returns nothing.

precomputeLayoutChildren

Arguments

object, window, dt, renderer

Returns

This function returns nothing.

calculateResolvedSize

Arguments

object, parentSize, window, dt, renderer, depth

Returns

This function returns nothing.

GetAbsoluteSize

Arguments

object, window, dt, renderer, depth

Returns

This function returns nothing.

getAbsoluteDrawPos

Arguments

object, window, dt, renderer, depth

Returns

This function returns nothing.

isMouseInRect

Arguments

mousePos, drawPos, size

Returns

This function returns nothing.

calculateDrawParams

Arguments

object, window, dt, renderer, depth

Returns

This function returns nothing.

resolveGuiPoint

Arguments

point

Returns

This function returns nothing.

getGuiMetrics

Arguments

object

Returns

This function returns nothing.

getMousePos

Arguments

window

Returns

This function returns nothing.

makeRect

Arguments

drawPos, size, color, isOutline

Returns

This function returns nothing.

resolveModifierRadius

Arguments

modifier

Returns

This function returns nothing.

getGuiShape

Arguments

UICorner, UISquircle

Returns

This function returns nothing.

createSignals

Arguments

This function takes no arguments.

Returns

This function returns nothing.

UIBackdrop

Arguments

window, rect, modifier, isSquircle, radius, exponent

Returns

This function returns nothing.

UIShadow

Arguments

window, drawPos, size, modifier, isSquircle, radius, exponent

Returns

This function returns nothing.

UISquircle

Arguments

window, rect, radius, exponent, strokeWidth

Returns

This function returns nothing.

UIStroke

Arguments

window, rect, UICorner, UISquircle, stroke

Returns

This function returns nothing.

GetBounds

Returns the absolute top-left position and size of the GUI object.

Arguments

self: table

Returns

Vector2, Vector2

GetCenter

Returns the absolute center point of the GUI object.

Arguments

self: table

Returns

Vector2

IsPointInside

Returns whether a screen-space point is inside the GUI object bounds.

Arguments

self: table, point: Vector2

Returns

boolean

GetRelativePoint

Converts a screen-space point into coordinates relative to the GUI object.

Arguments

self: table, point: Vector2

Returns

Vector2?

render

Renders this GUI object's background, updates absolute bounds and hover state.

Arguments

window: table, object: table, dt: number, renderer: table

Returns

vector?, vector?

IsParentGuiContainer

Returns whether an object is parented directly under a GUI container.

Arguments

object: table

Returns

boolean

renderChildren

Renders visible GUI children, applying ClipsDescendants as a plain rect clip.

Arguments

window: table, object: table, dt: number, renderer: table

Returns

This function returns nothing.

calculatePositions

Updates absolute position, absolute size, and hover state without drawing.

Arguments

window: table, object: table, dt: number, renderer: table

Returns

vector, vector

API

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

On this page