guicontrol: members
124 implemented, 0 reserved. Entries are sorted by name.
Implemented
Section titled “Implemented”acceptdropfiles
Section titled “acceptdropfiles”guicontrol.acceptdropfiles: boolean
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Kept for scripts. Borne never hands dropped files to a script, so it changes nothing.
Ctrl.acceptdropfiles = true;Specification: gui.md§2.6.
active
Section titled “active”guicontrol.active: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the control reacts to the mouse and keyboard.
new GuiControl("MyControl") { active = true; }Specification: gui.md§2.2.
addcontrol
Section titled “addcontrol”guicontrol.addcontrol(control: object) -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Makes the control the last child of this one; a control that had another parent leaves it. Adding a control to itself or to one of its descendants reports R-GUI-PARENT.
MainWindow.addControl(MyButton);Specification: gui.md§2.4.
guicontrol.alpha: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Opacity from 0 to 1; it also applies to the children.
new GuiControl("MyControl") { alpha = 0.5; }Specification: gui.md§2.2.
areaclickpriority
Section titled “areaclickpriority”guicontrol.areaclickpriority: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Touch-screen click priority; kept for scripts and without effect on a desktop.
Ctrl.areaclickpriority = 1;Specification: gui.md§2.6.
guicontrol.awake: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.
Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).
new GuiBitmapBorderCtrl("MyControl") { awake = 1; }Specification: gui.md§3.
bitmapcache
Section titled “bitmapcache”guicontrol.bitmapcache: boolean
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Hint that the control and its children may be drawn from a cached picture; kept for scripts.
Ctrl.bitmapcache = true;Specification: gui.md§2.6.
guicontrol.blue: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Blue part of the control tint, from 0 to 1.
Ctrl.blue = 0.5;Specification: gui.md§2.6.
bounds
Section titled “bounds”guicontrol.bounds: array
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Position and size in one array: x, y, width, height. Writing it moves and resizes.
Ctrl.bounds = {10, 10, 200, 100};Specification: gui.md§2.6.
bringtofront
Section titled “bringtofront”guicontrol.bringtofront() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Draws the control above its siblings.
MainWindow.bringToFront();Specification: gui.md§2.4.
canmove
Section titled “canmove”guicontrol.canmove: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the player can drag the control.
new GuiControl("MyControl") { canmove = true; }Specification: gui.md§2.2.
canresize
Section titled “canresize”guicontrol.canresize: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the player can resize the control from its corner.
new GuiControl("MyControl") { canresize = true; }Specification: gui.md§2.2.
catchevent
Section titled “catchevent”guicontrol.catchevent(target: any, event: string, callback: string) -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Routes an event of a control to a function of the object it is called on; the control comes first among the arguments of the function.
thiso.catchevent(this.name, "onAction", "onClose");Specification: gui.md§6.3.
clearcontrols
Section titled “clearcontrols”guicontrol.clearcontrols() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Destroys every child of this control.
MainWindow.clearControls();Specification: gui.md§2.4.
clientextent
Section titled “clientextent”guicontrol.clientextent: array
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
The client area size as “width height”.
new GuiControl("MyControl") { clientextent = {0, 0, 10, 10}; }Specification: gui.md§3.
clientheight
Section titled “clientheight”guicontrol.clientheight: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Height of the client area: a window’s height without its title bar.
new GuiControl("MyControl") { clientheight = 10; }Specification: gui.md§3.
clientwidth
Section titled “clientwidth”guicontrol.clientwidth: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Width of the client area: the width without the title bar or frame of a window.
new GuiControl("MyControl") { clientwidth = 10; }Specification: gui.md§3.
clipchildren
Section titled “clipchildren”guicontrol.clipchildren: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether children are cut at the edges of the control.
new GuiControl("MyControl") { clipchildren = true; }Specification: gui.md§2.2.
clipmove
Section titled “clipmove”guicontrol.clipmove: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether dragging keeps the control inside its parent.
new GuiControl("MyControl") { clipmove = true; }Specification: gui.md§2.2.
cliptobounds
Section titled “cliptobounds”guicontrol.cliptobounds: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the control is cut at the edges of its parent.
new GuiControl("MyControl") { cliptobounds = true; }Specification: gui.md§2.2.
guicontrol.color: array
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
The tint and opacity in one array of four values from 0 to 255: red, green, blue, alpha.
Ctrl.color = {255, 128, 0, 255};Specification: gui.md§2.6.
controls
Section titled “controls”guicontrol.controls: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.
The child controls, as an array. Read-only.
echo(MyControl.controls);Specification: gui.md§2.3.
createanimation
Section titled “createanimation”guicontrol.createanimation() -> guianimation
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Makes a transition object for the control. Set its transition and duration; it starts at once and shows the control.
anim = Ctrl.createAnimation();anim.transition = "fadein";anim.duration = 0.5;Specification: gui.md§2.6.
cursor
Section titled “cursor”guicontrol.cursor: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Pointer shape over the control: default, text, pointer, crosshair, col-resize, row-resize, progress, wait, help or drag; hand is stored as pointer and any other name as default.
new GuiButtonCtrl("MyButton") { cursor = "pointer"; }Specification: gui-legacy.md§26.1.
destroy
Section titled “destroy”guicontrol.destroy()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Destroys the control and its children; onRemove runs on the way out.
MyWindow.destroy();Specification: gui.md§2.4.
editing
Section titled “editing”guicontrol.editing: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the control is in editing mode.
new GuiControl("MyControl") { editing = true; }Specification: gui.md§2.2.
extent
Section titled “extent”guicontrol.extent: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Size as “width height” or {width, height}.
new GuiControl("MyControl") { extent = "200 100"; }Specification: gui.md§2.1.
fastchildrender
Section titled “fastchildrender”guicontrol.fastchildrender: boolean
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Hint that bitmap children may use a faster drawing path; kept for scripts.
Ctrl.fastchildrender = true;Specification: gui.md§2.6.
findcontrol
Section titled “findcontrol”guicontrol.findcontrol(arg1: string) -> guicontrol
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Returns the control under a point given in the coordinates of this control, or nothing.
Control.findcontrol("");Specification: gui.md§3.
findobject
Section titled “findobject”guicontrol.findobject(name: string) -> guicontrol
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Finds a descendant of this control by name; the control itself and other controls do not count.
temp.b = MainWindow.findObject("MainButton");Specification: gui.md§2.4.
firstresponder
Section titled “firstresponder”guicontrol.firstresponder: guicontrol
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
The control inside this one that has the keyboard focus, or empty. Writing a control inside gives it the focus.
echo(Window.firstresponder.name);Specification: gui.md§2.6.
flickerbasetime
Section titled “flickerbasetime”guicontrol.flickerbasetime: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Shifts the phase of flickering by this many seconds, so controls with one flickertime blink apart.
Ctrl.flickerbasetime = random(0, 1);Specification: gui.md§2.6.
flickering
Section titled “flickering”guicontrol.flickering: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the control blinks.
new GuiControl("MyControl") { flickering = true; }Specification: gui.md§2.2.
flickertime
Section titled “flickertime”guicontrol.flickertime: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Seconds between blinks while flickering.
new GuiControl("MyControl") { flickertime = 0.25; }Specification: gui.md§2.2.
getparent
Section titled “getparent”guicontrol.getparent() -> guicontrol
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
The parent control, or empty for the root canvas.
echo(Inner.getParent().name);Specification: gui.md§2.4.
getroot
Section titled “getroot”guicontrol.getroot() -> guicontrol
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
The root canvas GuiRoot.
echo(Inner.getRoot().name);Specification: gui.md§2.4.
globaltolocalcoord
Section titled “globaltolocalcoord”guicontrol.globaltolocalcoord(x: number, y: number) -> array
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Converts a point of the screen to a point relative to this control, as {x, y}.
temp.p = Button.globalToLocalCoord(100, 50);Specification: gui.md§2.4.
guicontrol.green: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Green part of the control tint, from 0 to 1.
Ctrl.green = 0.5;Specification: gui.md§2.6.
height
Section titled “height”guicontrol.height: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Height in pixels.
new GuiControl("MyControl") { height = 10; }Specification: gui.md§2.1.
guicontrol.hide() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Hides the control and its children and raises onHide when it was visible.
MainWindow.hide();Specification: gui.md§2.4.
guicontrol.hint: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Tooltip text shown when the pointer rests on the control.
new GuiControl("MyControl") { hint = "Hello"; }Specification: gui.md§2.2.
hinttime
Section titled “hinttime”guicontrol.hinttime: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Seconds the pointer must rest on the control before its hint shows; 0.5 by default.
Ctrl.hinttime = 1;Specification: gui.md§2.6.
horizsizing
Section titled “horizsizing”guicontrol.horizsizing: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
How the control follows a parent that changes width: right, left, center, width or relative.
new GuiControl("MyControl") { horizsizing = "width"; }Specification: gui.md§2.1.
guicontrol.id: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.
Engine identifier of the control. Read-only.
echo(MyControl.id);Specification: gui.md§1.1.
isactuallyvisible
Section titled “isactuallyvisible”guicontrol.isactuallyvisible() -> boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Returns true when the control and all its parents are visible.
Control.isactuallyvisible();Specification: gui.md§3.
isfirstresponder
Section titled “isfirstresponder”guicontrol.isfirstresponder() -> boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
True while the control has the keyboard focus.
echo(Edit.isFirstResponder());Specification: gui.md§2.4.
isinanimation
Section titled “isinanimation”guicontrol.isinanimation: boolean
Runs on: client only. Origin: compatibility. Since: M14. Playground: no. read-only.
True while the control runs a transition made with createAnimation.
echo(Ctrl.isinanimation);Specification: gui.md§2.6.
isininoutanimation
Section titled “isininoutanimation”guicontrol.isininoutanimation: boolean
Runs on: client only. Origin: compatibility. Since: M14. Playground: no. read-only.
True while the control runs a transition that shows or hides it.
echo(Ctrl.isininoutanimation);Specification: gui.md§2.6.
ismouselocked
Section titled “ismouselocked”guicontrol.ismouselocked(arg1: number) -> boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Returns true when the mouse is locked to this control.
Control.ismouselocked(0);Specification: gui.md§3.
guicontrol.layer: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.
Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).
new GuiBitmapBorderCtrl("MyControl") { layer = 1; }Specification: gui.md§3.
localtoglobalcoord
Section titled “localtoglobalcoord”guicontrol.localtoglobalcoord(x: number, y: number) -> array
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Converts a point relative to this control to a point of the screen, as {x, y}.
temp.p = Button.localToGlobalCoord(1, 1);Specification: gui.md§2.4.
lockmousedown
Section titled “lockmousedown”guicontrol.lockmousedown: boolean
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
When true a press on the control belongs to it and it keeps the mouse until the button is released.
Ctrl.lockmousedown = true;Specification: gui.md§2.6.
makefirstresponder
Section titled “makefirstresponder”guicontrol.makefirstresponder(on: boolean) -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Gives the control the keyboard focus, or takes it away when the value is false.
Edit.makeFirstResponder(true);Specification: gui.md§2.4.
minextent
Section titled “minextent”guicontrol.minextent: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Smallest size the player can resize the control to, as “width height”.
new GuiControl("MyControl") { minextent = "50 30"; }Specification: gui.md§2.1.
minsize
Section titled “minsize”guicontrol.minsize: string
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Another name of minextent: the least size the control can be resized to.
Ctrl.minsize = "50 30";Specification: gui.md§2.6.
guicontrol.mode: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
How a bitmap control blends with what is below: 0 add, 1 transparent, 2 subtract, 3 day and night.
Ctrl.mode = 0;Specification: gui.md§2.6.
mouselock
Section titled “mouselock”guicontrol.mouselock(arg1: number) -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Keeps the mouse on this control until it is unlocked or the button goes up.
Control.mouselock(0);Specification: gui.md§3.
mouseunlock
Section titled “mouseunlock”guicontrol.mouseunlock(arg1: number) -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Lets the mouse go again.
Control.mouseunlock(0);Specification: gui.md§3.
mouseunlockall
Section titled “mouseunlockall”guicontrol.mouseunlockall() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Lets every locked mouse go.
Control.mouseunlockall();Specification: gui.md§3.
guicontrol.name: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.
The name given when the control was created. Read-only.
echo(MyControl.name);Specification: gui.md§1.1.
onAction
Section titled “onAction”guicontrol.onAction()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised by the main action of a control: a button click, Enter in a text edit, a changed slider or check box value.
function MyControl.onAction() { echo("onAction");}Specification: gui.md§2.5.
guicontrol.onAdd()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised on a control when it is added to a parent.
function MyControl.onAdd() { echo("onAdd");}Specification: gui.md§2.5.
onAnimationFinished
Section titled “onAnimationFinished”guicontrol.onAnimationFinished(transition: string)
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised when the last transition of the control ends on its own, with the name of the transition.
function MyControl.onAnimationFinished(name) { echo(name);}Specification: gui.md§3.13.
onBecomeFirstResponder
Section titled “onBecomeFirstResponder”guicontrol.onBecomeFirstResponder()
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised when the control gets the keyboard focus.
function MyControl.onBecomeFirstResponder() { echo("focus");}Specification: gui.md§3.13.
onDefaultStyleChanges
Section titled “onDefaultStyleChanges”guicontrol.onDefaultStyleChanges(style: string)
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised on the root canvas when the default GUI style is changed in the options.
function GuiRoot.onDefaultStyleChanges(style) { echo(style);}Specification: gui.md§3.13.
onDialogPop
Section titled “onDialogPop”guicontrol.onDialogPop()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the modal dialog of the control closes.
function MyControl.onDialogPop() { echo("onDialogPop");}Specification: gui.md§2.5.
onDialogPush
Section titled “onDialogPush”guicontrol.onDialogPush()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the control is shown as a modal dialog.
function MyControl.onDialogPush() { echo("onDialogPush");}Specification: gui.md§2.5.
onFirstResponderChanges
Section titled “onFirstResponderChanges”guicontrol.onFirstResponderChanges(control: any)
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised on the root canvas whenever the keyboard focus moves, with the control that has it now.
function GuiRoot.onFirstResponderChanges(ctrl) { echo(ctrl.name);}Specification: gui.md§3.13.
onHide
Section titled “onHide”guicontrol.onHide()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when a visible control is hidden.
function MyControl.onHide() { echo("onHide");}Specification: gui.md§2.5.
onKeyDown
Section titled “onKeyDown”guicontrol.onKeyDown(keycode: number, key: string, modifiers: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised on the focused control when a key goes down.
function MyControl.onKeyDown(code, key, mods) { echo("onKeyDown");}Specification: gui.md§2.5.
onKeyUp
Section titled “onKeyUp”guicontrol.onKeyUp(keycode: number, key: string, modifiers: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised on the focused control when a key goes up.
function MyControl.onKeyUp(code, key, mods) { echo("onKeyUp");}Specification: gui.md§2.5.
onLoseFirstResponder
Section titled “onLoseFirstResponder”guicontrol.onLoseFirstResponder()
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised when the control loses the keyboard focus.
function MyControl.onLoseFirstResponder() { echo("blur");}Specification: gui.md§3.13.
onMouseDown
Section titled “onMouseDown”guicontrol.onMouseDown(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the left button goes down over the control, with the modifier keys, the position and the click count.
function MyControl.onMouseDown(mods, x, y, clicks, pointer) { echo("onMouseDown");}Specification: gui.md§2.5.
onMouseDragged
Section titled “onMouseDragged”guicontrol.onMouseDragged(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the cursor moves while the left button pressed on the control is held.
function MyControl.onMouseDragged(mods, x, y, clicks, pointer) { echo("onMouseDragged");}Specification: gui.md§2.5.
onMouseEnter
Section titled “onMouseEnter”guicontrol.onMouseEnter(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the cursor moves onto the control.
function MyControl.onMouseEnter(mods, x, y, clicks, pointer) { echo("onMouseEnter");}Specification: gui.md§2.5.
onMouseLeave
Section titled “onMouseLeave”guicontrol.onMouseLeave(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the cursor leaves the control.
function MyControl.onMouseLeave(mods, x, y, clicks, pointer) { echo("onMouseLeave");}Specification: gui.md§2.5.
onMouseMove
Section titled “onMouseMove”guicontrol.onMouseMove(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the cursor moves over the control with no button held.
function MyControl.onMouseMove(mods, x, y, clicks, pointer) { echo("onMouseMove");}Specification: gui.md§2.5.
onMouseUp
Section titled “onMouseUp”guicontrol.onMouseUp(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the left button goes up after a press on the control.
function MyControl.onMouseUp(mods, x, y, clicks, pointer) { echo("onMouseUp");}Specification: gui.md§2.5.
onMouseWheelDown
Section titled “onMouseWheelDown”guicontrol.onMouseWheelDown(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised once per wheel step turned down over the control.
function MyControl.onMouseWheelDown(mods, x, y, clicks, pointer) { echo("onMouseWheelDown");}Specification: gui.md§2.5.
onMouseWheelUp
Section titled “onMouseWheelUp”guicontrol.onMouseWheelUp(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised once per wheel step turned up over the control.
function MyControl.onMouseWheelUp(mods, x, y, clicks, pointer) { echo("onMouseWheelUp");}Specification: gui.md§2.5.
onMove
Section titled “onMove”guicontrol.onMove(x: number, y: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised after the position of the control changed, with the new position.
function MyControl.onMove() { echo("onMove");}Specification: gui.md§2.5.
onRemove
Section titled “onRemove”guicontrol.onRemove()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised on a control when it is taken out of its parent.
function MyControl.onRemove() { echo("onRemove");}Specification: gui.md§2.5.
onResize
Section titled “onResize”guicontrol.onResize(width: number, height: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised after the size of the control changed, with the new width and height.
function MyControl.onResize(w, h) { echo("onResize");}Specification: gui.md§2.5.
onRightMouseDown
Section titled “onRightMouseDown”guicontrol.onRightMouseDown(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the right button goes down over the control.
function MyControl.onRightMouseDown(mods, x, y, clicks, pointer) { echo("onRightMouseDown");}Specification: gui.md§2.5.
onRightMouseDragged
Section titled “onRightMouseDragged”guicontrol.onRightMouseDragged(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the cursor moves while the right button is held.
function MyControl.onRightMouseDragged(mods, x, y, clicks, pointer) { echo("onRightMouseDragged");}Specification: gui.md§2.5.
onRightMouseUp
Section titled “onRightMouseUp”guicontrol.onRightMouseUp(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when the right button goes up after a press on the control.
function MyControl.onRightMouseUp(mods, x, y, clicks, pointer) { echo("onRightMouseUp");}Specification: gui.md§2.5.
onShow
Section titled “onShow”guicontrol.onShow()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when a hidden control becomes visible.
function MyControl.onShow() { echo("onShow");}Specification: gui.md§2.5.
onSleep
Section titled “onSleep”guicontrol.onSleep()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when a control stops being part of the shown tree.
function MyControl.onSleep() { echo("onSleep");}Specification: gui.md§2.5.
onStartDrag
Section titled “onStartDrag”guicontrol.onStartDrag()
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised when the player starts moving or resizing the control with the mouse.
function MyControl.onStartDrag() { echo("drag");}Specification: gui.md§3.13.
onStopDrag
Section titled “onStopDrag”guicontrol.onStopDrag(modifiers: number, x: number, y: number, clicks: number, pointer: number)
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised when the player lets go of a control being moved or resized.
function MyControl.onStopDrag(mods, x, y, clicks, pointer) { echo("onStopDrag");}Specification: gui.md§3.13.
onStyleChanges
Section titled “onStyleChanges”guicontrol.onStyleChanges(style: string)
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Raised when the style of the control was set to a different value, with the new style name.
function MyControl.onStyleChanges(style) { echo(style);}Specification: gui.md§3.13.
onWake
Section titled “onWake”guicontrol.onWake()
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Raised when a control becomes part of the shown tree (it and all its parents visible).
function MyControl.onWake() { echo("onWake");}Specification: gui.md§2.5.
parent
Section titled “parent”guicontrol.parent: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.
The parent control. Read-only.
echo(MyControl.parent);Specification: gui.md§2.3.
position
Section titled “position”guicontrol.position: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Position as “x y” or {x, y}.
new GuiControl("MyControl") { position = "10 20"; }Specification: gui.md§2.1.
profile
Section titled “profile”guicontrol.profile: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
The profile that styles the control, by name or object.
new GuiControl("MyControl") { profile = "MyProfile"; }Specification: gui.md§2.3.
pushtoback
Section titled “pushtoback”guicontrol.pushtoback() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Draws the control below its siblings.
Backdrop.pushToBack();Specification: gui.md§2.4.
guicontrol.red: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Red part of the control tint, from 0 to 1.
Ctrl.red = 0.5;Specification: gui.md§2.6.
reflow
Section titled “reflow”guicontrol.reflow() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Lays out the control and its children again at once.
List.reflow();Specification: gui.md§2.4.
removecontrol
Section titled “removecontrol”guicontrol.removecontrol(control: object) -> boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Takes a child out of this control. The child keeps existing without a parent.
MainWindow.removeControl(MyButton);Specification: gui.md§2.4.
repaint
Section titled “repaint”guicontrol.repaint() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Asks for a repaint; the toolkit repaints every frame, so this does nothing.
Control.repaint();Specification: gui.md§3.
resize
Section titled “resize”guicontrol.resize(x: number, y: number, width: number, height: number) -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Sets position and size at once; the children follow their sizing modes and the control raises onResize.
MainWindow.resize(10, 10, 300, 200);Specification: gui.md§2.4.
resizeheight
Section titled “resizeheight”guicontrol.resizeheight: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).
new GuiBitmapBorderCtrl("MyControl") { resizeheight = 1; }Specification: gui.md§3.
resizewidth
Section titled “resizewidth”guicontrol.resizewidth: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).
new GuiBitmapBorderCtrl("MyControl") { resizewidth = 1; }Specification: gui.md§3.
rotation
Section titled “rotation”guicontrol.rotation: number
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Rotation of the control in radians; kept for scripts and for transitions.
Ctrl.rotation = 0.5;Specification: gui.md§2.6.
rotationcenter
Section titled “rotationcenter”guicontrol.rotationcenter: array
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
The point the rotation turns around, as x and y; defaults to 0, 0.
Ctrl.rotationcenter = {10, 10};Specification: gui.md§2.6.
scrolllinex
Section titled “scrolllinex”guicontrol.scrolllinex: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).
new GuiBitmapBorderCtrl("MyControl") { scrolllinex = 1; }Specification: gui.md§3.
scrollliney
Section titled “scrollliney”guicontrol.scrollliney: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).
new GuiBitmapBorderCtrl("MyControl") { scrollliney = 1; }Specification: gui.md§3.
scrolltobottom
Section titled “scrolltobottom”guicontrol.scrolltobottom() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Scrolls the scroll control around this control to the bottom.
Content.scrollToBottom();Specification: gui.md§3.
scrolltotop
Section titled “scrolltotop”guicontrol.scrolltotop() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Scrolls the scroll control around this control to the top.
Content.scrollToTop();Specification: gui.md§3.
guicontrol.show() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Makes the control visible and raises onShow when it was hidden.
MainWindow.show();Specification: gui.md§2.4.
showhint
Section titled “showhint”guicontrol.showhint: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the hint is shown.
new GuiControl("MyControl") { showhint = true; }Specification: gui.md§2.2.
showtop
Section titled “showtop”guicontrol.showtop() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Shows the control and brings it in front of its siblings.
MainWindow.showTop();Specification: gui.md§2.4.
sortcontrols
Section titled “sortcontrols”guicontrol.sortcontrols() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Orders the child controls by their y position.
Control.sortcontrols();Specification: gui.md§3.
startdrag
Section titled “startdrag”guicontrol.startdrag() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Moves the control with the mouse until the button goes up.
Control.startdrag();Specification: gui.md§3.
stopanimations
Section titled “stopanimations”guicontrol.stopanimations() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Stops control animations; there are none, so this does nothing.
Control.stopanimations();Specification: gui.md§3.
stopinoutanimations
Section titled “stopinoutanimations”guicontrol.stopinoutanimations() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Stops animations that move a control in or out; there are none, so this does nothing.
Control.stopinoutanimations();Specification: gui.md§3.
guicontrol.style: string
Runs on: client only. Origin: compatibility. Since: M14. Playground: no.
Name of the GUI style the control follows; setting a different one raises onStyleChanges.
Ctrl.style = "dark";Specification: gui.md§2.6.
tabfirst
Section titled “tabfirst”guicontrol.tabfirst() -> boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Focuses the first descendant that can take key focus.
Form.tabFirst();Specification: gui.md§2.4.
useownprofile
Section titled “useownprofile”guicontrol.useownprofile: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the control keeps a private copy of its profile.
new GuiControl("MyControl") { useownprofile = true; }Specification: gui.md§2.3.
vertsizing
Section titled “vertsizing”guicontrol.vertsizing: string
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
How the control follows a parent that changes height: bottom, top, center, height or relative.
new GuiControl("MyControl") { vertsizing = "height"; }Specification: gui.md§2.1.
visible
Section titled “visible”guicontrol.visible: boolean
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Whether the control and its children are drawn.
new GuiControl("MyControl") { visible = true; }Specification: gui.md§2.2.
guicontrol.width: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Width in pixels.
new GuiControl("MyControl") { width = 10; }Specification: gui.md§2.1.
guicontrol.x: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Left edge in pixels, relative to the parent.
new GuiControl("MyControl") { x = 10; }Specification: gui.md§2.1.
guicontrol.y: number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Top edge in pixels, relative to the parent.
new GuiControl("MyControl") { y = 10; }Specification: gui.md§2.1.
Engine version 0.1.0. Built 2026-11-18.