UIObject

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

Up and coming

The base of everything drawn in a window: place it, hide it, layer it, clip it, fade a whole panel, or give it a tooltip and a right-click menu.

Set where a thing should be and it eases there by its Transition. Every visible property set in one go lands on the same frame, a change mid-way carries on from where it is drawn instead of restarting, a new object fades in and Destroy fades it out. Its input events are for custom controls; Button, TextBox and DragDetector cover the usual ones.

Properties

NameTypeDefaultDescription
PositionUDim2Relative to the parent, so moving a container moves all its children with one write.
SizeUDim2
AnchorPointVector2
VisiblebooleanSetting false fades it out, then it stops drawing and taking pointer input; true fades it back in.
ZIndexnumberDraw order across the whole window; ties draw in tree order, and menus, tooltips and dialogs always sit above.
LayoutOrdernumberThe order a Stack places its children in, before tree order.
ClipsDescendantsbooleanChildren are cut to this box, rounded corners included.
GroupTransparencynumberMultiplies down the whole subtree, so a panel fades with its children without setting each child.
TransitionTransitionHow visible changes ease: Transition.new(0.7, "Modify") by default; Transition.None follows at once, for something under a drag.
TooltipstringShown at the pointer after 0.5 seconds and faded in; the text before ": " is bold.
CursorCursorType?The cursor over it: Default, Hand, Text, Move, ResizeX, ResizeY, Busy or NotAllowed; nil uses the parent's.
ContextMenuMenu?A right-click or the Menu key opens it at the pointer, with no code.
ActivebooleanWhen true it takes pointer input, so nothing under it sees that input.

Methods

NameArgumentsReturnsDescription
SetTransition(property: string, transition: Transition)()Gives one property its own easing, such as Position on "BasicCurve".

Events

NamePassesDescription
MouseEnter()
MouseLeave()
InputBegan(InputObject)
InputEnded(InputObject)
MouseWheel(number)Passes the wheel's delta; for custom controls, since Button, TextBox and DragDetector cover the usual input.
From ScreenItem 2
From ShotInstance 33

Subclasses