Kinemium Docs

GuiObject

Base class for 2D GUI elements with layout, rendering, input, and tween helpers.

Properties

PropertyTypeDefault
PositionUDim2UDim2.new(0, 0, 0, 0)
SizeUDim2UDim2.new(0, 100, 0, 100)
BackgroundColor3Color3Color3.new(1, 1, 1)
BackgroundTransparencynumber0
Visiblebooleantrue
BorderSizenumber0
BorderColorColor3Color3.new(0, 0, 0)
BorderTransparencynumber0
Rotationnumber0
AbsolutePositionanynil
Anchoredbooleantrue
AbsoluteSizeanynil
AutomaticSizeEnumItemEnum.AutomaticSize.None
ClipsDescendantsbooleanfalse
ZIndexnumber1
AnchorPointanyZERO_V
MouseIsInObjectbooleanfalse
tiltanychild
corneranychild
strokeanychild
gradientanychild
shadowanychild
glowanychild
rippleanychild
vignetteanychild
bevelanychild
squircleanychild
blendanychild
bluranychild
drawPosanyvector.create(drawPos.X + nx * maxOffset.X, drawPos.Y + ny * maxOffset.Y, 0)
selfBlendActivebooleantrue
cornerRadiusanymath.min(cornerRadius, minDim / 2)
offsetRightanyoffsetLeft

Functions


resolveUDim2

Arguments

val, parentDim

Returns

This function returns nothing.

resolveBlendMode

Arguments

raylib, value

Returns

This function returns nothing.

drawCornerArc

Arguments

lib, cx, cy, radius, angleStart, angleEnd, color

Returns

This function returns nothing.

drawRoundedRectangleEx

Arguments

lib, x, y, w, h, tl, tr, bl, br, color

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, lib, dt, structs, renderer

Returns

This function returns nothing.

calculateResolvedSize

Arguments

object, parentSize, lib, dt, structs, renderer, depth

Returns

This function returns nothing.

GetAbsoluteSize

Arguments

object, lib, dt, structs, renderer, depth

Returns

This function returns nothing.

getAbsoluteDrawPos

Arguments

object, lib, dt, structs, renderer, depth

Returns

This function returns nothing.

isMouseInRect

Arguments

mousePos, drawPos, size

Returns

This function returns nothing.

calculateDrawParams

Arguments

object, lib, dt, structs, renderer, depth

Returns

This function returns nothing.

resolveGuiPoint

Arguments

point

Returns

This function returns nothing.

getGuiMetrics

Arguments

object

Returns

This function returns nothing.

getGuiTweenRegistry

Arguments

object

Returns

This function returns nothing.

isTweenBusy

Arguments

tween

Returns

This function returns nothing.

playGuiTween

Arguments

object,
	propertyNames,
	properties,
	easingDirection,
	easingStyle,
	duration,
	override,
	callback

Returns

This function returns nothing.

resolveCornerRadii

Arguments

corner, minDim

Returns

This function returns nothing.

isDefaultCornerValue

Arguments

prop

Returns

This function returns nothing.

resolve

Arguments

prop

Returns

This function returns nothing.

isDifferent

Arguments

prop

Returns

This function returns nothing.

appendPoint

Arguments

points, x, y

Returns

This function returns nothing.

appendSquircleArc

Arguments

points, cx, cy, radius, sx, sy, angleStart, angleEnd, exponent, skipFirst

Returns

This function returns nothing.

buildSquirclePoints

Arguments

x, y, w, h, tl, tr, bl, br, exponent

Returns

This function returns nothing.

drawSquircleFilled

Arguments

lib, x, y, w, h, tl, tr, bl, br, exponent, color

Returns

This function returns nothing.

drawSquircleOutline

Arguments

lib, x, y, w, h, tl, tr, bl, br, exponent, thickness, color

Returns

This function returns nothing.

getRoundedHorizontalInset

Arguments

localY, height, radius, exponent

Returns

This function returns nothing.

edgeInset

Arguments

distanceToEdge

Returns

This function returns nothing.

drawShadow

Arguments

lib, structs, object, shadow, drawPos, size, corner, squircle

Returns

This function returns nothing.

drawShapeFill

Arguments

lib, structs, object, modifier, x, y, w, h, color

Returns

This function returns nothing.

drawShapeOutline

Arguments

lib, structs, object, modifier, x, y, w, h, thickness, color

Returns

This function returns nothing.

drawGlow

Arguments

lib, structs, object, glow, drawPos, size, shapeModifier

Returns

This function returns nothing.

drawVignette

Arguments

lib, structs, object, vignette, drawPos, size, shapeModifier

Returns

This function returns nothing.

drawBevel

Arguments

lib, structs, object, bevel, drawPos, size, shapeModifier

Returns

This function returns nothing.

drawRipple

Arguments

lib, raylib, ripple, object, drawPos, size, dt

Returns

This function returns nothing.

createSignals

Arguments

This function takes no arguments.

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?

CancelGuiTweens

Cancels active GUI tweens started by this object.

Arguments

self: table

Returns

This function returns nothing.

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, any

TweenSize

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, any

TweenSizeAndPosition

Tweens Size and Position together.

Arguments

self: table, endSize: UDim2, endPosition: UDim2, easingDirection: string, easingStyle: string, time: number, override: boolean?, callback: function?

Returns

boolean, any

IsParentGuiContainer

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

Arguments

object: table

Returns

boolean

calculatePositions

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

Arguments

lib: number, object: table, dt: number, structs: table, renderer: number

Returns

Vector3, Vector3

API

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

On this page