GUI Control
128 scripting commands. Also as Markdown for agents.
- activeTitleEffectParamsReturns type, effect, speed and map visibility of the given active title effect (see allActiveTitleEffects)
- allActiveTitleEffectsReturns a list of all layers that have currently active title effect. Numbers equal to or greater than 0 represent cut layers, where as -1 represents…
- allControlsReturns a list of all controls in the provided display or controls group, including "sub"-controls from other CT_CONTROLS_GROUPs.
- allCutLayersReturns all named layers used by cutRsc, cutText, cutObj or cutFadeOut. The layer normally would be added on the first use of any of the…
- allDisplaysReturns a list of all opened GUI displays.
- buttonActionReturns the action assigned to a control of the currently active user dialog. Can be used for buttons and active texts. Read Arma: GUI Configuration…
- buttonSetActionSet the action of a control of the currently active user dialog. The script statement is executed on button release and `_this` is available, but…
- cbCheckedReturns the current state of a CT_CHECKBOX control.
- cbSetCheckedSets the current state of a CT_CHECKBOX control. Use `"CheckedChanged"` control event handler with it.
- closeDialogCloses the currently active dialog with exit code. It does not instantly close the dialog but does it on next simulation cycle. Most common exit…
- closeDisplayCloses given display with exit code. It does not instantly close the display but does it on next simulation cycle. Most common exit codes are:
- controlNullA non-existing Control. To compare non-existent objects use isNull or isEqualTo (see examples).
- controlsGroupCtrlReturns a child control with specified idc from a controls group
- createDialogCreates a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given…
- createDisplayCreates child display of given display and loads from "resourceName". The notable difference between createDisplay and createDialog is that with…
- createGearDialogOpens gear dialog for given unit.
- createMissionDisplayCreate single missions display as a child of given display. The mission dialog will be set to the directory given as an argument "root".
- createMPCampaignDisplayCreate a MP campaign display. The class name must be a mission collection declared in the configs; for example, `configFile >> "CfgMissions" >>…
- ctrlActivateLaunches action attached to given (button based) control. Command ignores control disabled state. (Example 2).
- ctrlAtReturns the control at the specified coordinates.
- ctrlAutoScrollDelayReturns number of seconds auto-scroll will wait before scroll and/or rewind. -2 if scrollbar not present.
- ctrlAutoScrollRewindReturns true if auto-scroll should move back to start after it reaches the end.
- ctrlAutoScrollSpeedReturns number of seconds to auto-scroll one line. -1 if auto-scroll is disabled. -2 if scrollbar not present.
- ctrlBackgroundColorReturns control's background color.
- ctrlCheckedReturns the current state of given CT_CHECKBOXES control. Since Arma 3 v1.72 it is possible to query multiple checkboxes by providing checkbox index.…
- ctrlClassNameReturns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself:
- ctrlCommitCommits control animation to last specified duration.
- ctrlCommittedCheck if the control animation is finished.
- ctrlCreateCreates a new control in the given display.
- ctrlDeleteDeletes given control. The control has to be created either by script with ctrlCreate or to have `deletable` property in config set to 1.
- ctrlEnableEnables or disables a control of the currently active user dialog. Disabled controls cannot be clicked onto. Read Arma: GUI Configuration for more…
- ctrlEnabledReturns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused. Read Arma: GUI Configuration for more…
- ctrlFadeReturns the current fade factor of control.
- ctrlFontHeightReturns control's font size, usually `sizeEx` value (see ctrlSetFontHeight).
- ctrlForegroundColorReturns control's foreground color.
- ctrlGetPropertyReturns one or multiple given properties of given control.
- ctrlIDCReturns control IDC.
- ctrlIDDReturns display IDD.
- ctrlParentReturns the parent Display of the given control. For parent Controls group see ctrlParentControlsGroup.
- ctrlParentControlsGroupReturns the parent control of a given child control. If the control is not part of a CT_CONTROLS_GROUP control then controlNull is returned. To…
- ctrlScrollValuesReturns scroll values for current scrollbars in range 0...1 (-1 if not applicable) for the following controls: - CT_CONTROLS_TABLE -…
- ctrlSetActiveColorSets text color of given control when it is selected.
- ctrlSetAngleSets the rotation of a control set as `ST_PICTURE`. Rotation will be done within the control boundaries, so if the X and Y are given off center, the…
- ctrlSetAutoScrollDelaySets number of second before auto-scroll starts/rewinds. Setter for ctrlAutoScrollDelay.
- ctrlSetAutoScrollRewindDefines if scroll should rewind when auto-scroll reach end. Setter for ctrlAutoScrollRewind.
- ctrlSetAutoScrollSpeedSets number of second required to scroll to next line. If speed < 0, auto-scroll is disabled. Setter for ctrlAutoScrollSpeed.
- ctrlSetBackgroundColorSets background color of given control. Only affects: - CT_COMBO - CT_STATIC - CT_STRUCTURED_TEXT - CT_MAP - CT_MAP_MAIN - Arma 3 v2.02 CT_BUTTON -…
- ctrlSetCheckedSets checked state of a CT_CHECKBOXES control.
- ctrlSetDisabledColorSets the colorDisabled attribute of a control.
- ctrlSetFadeSets wanted transparency for control animation. Requires ctrlCommit to commit changes. To hide or show a control instantly, use ctrlShow.
- ctrlSetFocusSets the input focus on given control.
- ctrlSetFontSets the font for given control (see available fonts)
- ctrlSetFontHeightSecondarySets the font size of the secondary text of given control.
- ctrlSetFontSecondarySets the font size of the secondary text of given control.
- ctrlSetForegroundColorSets foreground color of the given control.
- ctrlSetPropertySets one or multiple given properties of given control.
- ctrlSetScrollValuesSets scroll values for current scrollbars in range 0..1 for the following controls: - CT_CONTROLS_TABLE - CT_CONTROLS_GROUP - CT_TREE - CT_LISTBOX -…
- ctrlSetShadowSets 'shadow' property of the control: - 0 - no shadow - 1 - shadow - 2 - outline
- ctrlSetStructuredTextSet the Structured Text which will be displayed in structured text control.
- ctrlSetTextSets the text of a control of the currently active user dialog or display. This command can be used for static texts, buttons, edit lines and active…
- ctrlSetTextColorSets text color of given control. As of Arma 3 v1.40 this command can also be used to change fill-color of a CT_PROGRESS control.
- ctrlSetTextColorSecondarySets the secondary text color of a text control.
- ctrlSetTextSecondarySets the secondary text of a text control.
- ctrlSetTextSelectionSelects `length` characters of edit control from the `start` position and places cursor at the end of selection.
- ctrlSetTooltipSets tooltip text of given control.
- ctrlSetTooltipColorBoxSets tooltip border color of given control.
- ctrlSetTooltipColorShadeSets tooltip background color of given control.
- ctrlSetTooltipColorTextSets tooltip text color of given control.
- ctrlSetTooltipMaxWidthSet maximum width of a control's tooltip.
- ctrlSetURLSets URL property of the given control subject to `allowedHTMLLoadURIs[]` whitelisting in CfgCommands config. Supported controls are: - `CT_BUTTON` -…
- ctrlSetURLOverlayModeSets how to handle opening of URL, default browser or Steam overlay. Possible values: - 0 - default browser - 1 - Steam overlay if enabled, otherwise…
- ctrlShadowReturns 'shadow' property of the control (see ctrlSetShadow).
- ctrlShowShows or hides a control, or group of controls together with all the controls inside that group of controls.
- ctrlShownReturns whether given control is shown.
- ctrlStyleReturns the provided control's style. See Arma: GUI Configuration#Control Styles.
- ctrlTextReturns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as…
- ctrlTextColorReturns control's text color
- ctrlTextHeightReturns the text control's height. Supported control types: - CT_STATIC - CT_STRUCTURED_TEXT - CT_EDIT - Arma 3 v2.06 CT_XKEYDESC - Arma 3 v2.06…
- ctrlTextSecondaryReturns the secondary text of a text control.
- ctrlTextSelectionReturns edit control text selection in format [start, length, selectedText].
- ctrlTextWidthReturns the width of the control text including left and right margins (0.008 each).
- ctrlTooltipReturns the tooltip property of a button control. Getter for ctrlSetTooltip.
- ctrlTypeReturns number representing the type of control, which is also defined by *type* property in config. For more information see Arma: GUI Configuration
- ctrlURLReturns the URL property of a button control. Getter for ctrlSetURL.
- ctrlURLOverlayModeReturns the URL overlay mode 0, 1, 2 (see ctrlSetURLOverlayMode) or -1 if something went wrong.
- ctrlVisibleReturns if a control of the currently active user dialog is shown or not. Read Arma: GUI Configuration for more information about user dialogs and…
- ctrlWebBrowserActionExecutes an action on a WebBrowser control. The type of parameters depends on the action type. Possible Actions are:
- cutFadeOutTerminates the effect in the given layer by fading it out according to the given duration. If named layer is used and it doesn't exist, it will be…
- cutObjDisplays an object defined in the global config in `CfgTitles`.
- cutRscDisplay a resource defined in RscTitles of the mission's Description.ext, the campaign's description.ext or the global config.
- cutTextDisplays a text message in the center of the screen. The text can be displayed on multiple lines by using "\n" new line characters: `cutText…
- dialogTests whether any user dialog is open.
- disableSerializationDisable saving of script containing this command. After this, the script can work with data types which do not support serialization (UI types).
- displayChildReturns child display of the given display.
- displayCtrlReturn child control with specified idc.
- displayNullA non-existing Display. To compare non-existent displays use isNull or isEqualTo:
- displayParentReturns parent display of the given display.
- displayUniqueNameGet the provided display's UI On Texture unique name.
- displayUpdateSet the provided display to update its UI On Texture render.
- findDisplayFinds a display by its IDD which can either be defined in missionConfigFile (description.ext) or configFile (config.cpp) or by its UI On Texture's…
- focusedCtrlReturns display's focused control.
- gearIDCAmmoCountReturns ammo count of assigned magazine.
- gearSlotAmmoCountReturns ammo count of assigned magazine.
- gearSlotDataReturns gear slot item name.
- getTextWidthReturns estimated width of the text based on font type and size. Similar to ctrlTextWidth but does not require a control and can be used to estimate…
- getUserMFDTextReturns array of user text variables used in MFD.
- htmlLoadLoad HTML from file or URI using given control. File path is relative to current mission dir or an absolute path (with drive letter etc.). The…
- imageCreates a structured text containing the given image. Use setAttributes to set additional attributes on the image.
- isSteamOverlayEnabledReturns true if Steam overlay is enabled, otherwise false.
- isUIContextReturns true if the script originated from some UI control event, for example from "onButtonDown" EH. Exists within parent scope and immediate child…
- lbTooltipReturns tooltip for ListBox, ComboBox and Toolbox
- preloadTitleObjPreloads data for the given resource object.
- preloadTitleRscResource title - preload data. The resource can be defined in the Description.ext file.
- progressPositionReturns the current position in the progress bar.
- progressSetPositionSets progress position of a progress bar.
- setUserMFDTextStored user text value in MFD, limit is 50, user0...user49
- sliderPositionReturns current thumb position of CT_SLIDER or CT_XSLIDER with given idc of topmost user dialog.
- sliderRangeReturns limits of CT_SLIDER or CT_XSLIDER.
- sliderSetPositionSets current thumb position of CT_SLIDER or CT_XSLIDER.
- sliderSetRangeSets limits of CT_SLIDER or CT_XSLIDER.
- sliderSetSpeedSets slider line step and page step delta amount as well as optional step amount of CT_SLIDER or CT_XSLIDER with given idc of topmost user dialog.
- sliderSpeedReturns slider step value for line and page movement of CT_SLIDER or CT_XSLIDER.
- titleCutDisplays text on screen.
- titleFadeOutTerminate the title effect and set duration of the fade out phase to the given time. Same as cutFadeOut but for the title layer.
- titleObjShows object defined in global config in CfgTitles
- titleRscDisplays a resource defined in RscTitles. Also see cutRsc, with these two commands you can show two different resources at once.
- titleTextDisplays text across the screen. If used along with cutText two different texts (in different type styles) can be shown at once.
- uiNamespaceReturns the global namespace attached to user interface.