UiToolkitAPI

Functions

AddDenyAllInputToGame

UiToolkitAPI.AddDenyAllInputToGame(panelPtr: GenericPanel, strDebugContextName: string): uint64_str

Denies input to the game by filtering input events. Returns a handle used by ReleaseDenyAllInputToGame.

Parameters

NameTypeDescription
panelPtrGenericPanel No description provided.
strDebugContextNamestringNo description provided.

AddDenyMouseInputToGame

UiToolkitAPI.AddDenyMouseInputToGame(panelPtr: GenericPanel, strDebugContextName: string): uint64_str

Denies mouse input to the game by filtering mouse input events. Returns a handle used by ReleaseDenyMouseInputToGame.

Parameters

NameTypeDescription
panelPtrGenericPanel No description provided.
strDebugContextNamestringNo description provided.

CloseAllVisiblePopups

UiToolkitAPI.CloseAllVisiblePopups(): void

Force closing all visible popups

GetGlobalObject

UiToolkitAPI.GetGlobalObject(): typescript.Record<string, unknown>

Returns a global object that can be used to store global variables you would like to share across js files.

HideCustomLayoutTooltip

UiToolkitAPI.HideCustomLayoutTooltip(tooltipID: string): void

Hide the tooltip with the given id.

Parameter

NameTypeDescription
tooltipIDstringNo description provided.

HideTextTooltip

UiToolkitAPI.HideTextTooltip(): void

Hide the text tooltip

HideTitleImageTextTooltip

UiToolkitAPI.HideTitleImageTextTooltip(): void

Hide the title image text tooltip

HideTitleTextTooltip

UiToolkitAPI.HideTitleTextTooltip(): void

Hide the title text tooltip

InvokeJSCallback

UiToolkitAPI.InvokeJSCallback(callback: number, ...args: any[]): void

Invoke a javascript callback using a handle previously registered with RegisterJSCallback. First argument must be the callback handle followed by the callback's arguments.

Parameters

NameTypeDescription
callbacknumberNo description provided.
...argsany[]No description provided.

IsPanoramaInECOMode

UiToolkitAPI.IsPanoramaInECOMode(): boolean

Is Panorama in ECO (perf) mode

MakeStringSafe

UiToolkitAPI.MakeStringSafe(str: string): string

No description provided.

Parameter

NameTypeDescription
strstringNo description provided.

ProfilingScopeBegin

UiToolkitAPI.ProfilingScopeBegin(tagName: string): void

Notify telemetry that a zone is been entered

Parameter

NameTypeDescription
tagNamestringNo description provided.

ProfilingScopeEnd

UiToolkitAPI.ProfilingScopeEnd(): double

Notify telemetry that a zone is been left. Returns duration in milliseconds.

RegisterHUDPanel2d

UiToolkitAPI.RegisterHUDPanel2d(panelTypeName: string, layoutFile: string): void

Register a HUD panel type name with the corresponding layout file

Parameters

NameTypeDescription
panelTypeNamestringNo description provided.
layoutFilestringNo description provided.

RegisterJSCallback

UiToolkitAPI.RegisterJSCallback(callback: Func<any[], void>): uuid

Register a javascript callback that can be invoke at a later stage using InvokeJSCallback. Returns a callback handle.

Parameter

NameTypeDescription
callbackFunc<any[], void>No description provided.

RegisterPanel2d

UiToolkitAPI.RegisterPanel2d(panelTypeName: string, layoutFile: string): void

Register a panel type name with the corresponding layout file

Parameters

NameTypeDescription
panelTypeNamestringNo description provided.
layoutFilestringNo description provided.

ReleaseDenyAllInputToGame

UiToolkitAPI.ReleaseDenyAllInputToGame(handle: string | number): void

ReleaseDenyAllInputToGame takes a handle as parameters previously returned by AddDenyAllInputToGame

Parameter

NameTypeDescription
handlestring | numberNo description provided.

ReleaseDenyMouseInputToGame

UiToolkitAPI.ReleaseDenyMouseInputToGame(handle: string | number): void

ReleaseDenyMouseInputToGame takes a handle as parameters previously returned by AddDenyMouseInputToGame

Parameter

NameTypeDescription
handlestring | numberNo description provided.

ShowCustomLayoutContextMenu

UiToolkitAPI.ShowCustomLayoutContextMenu(targetPanelID: string, contentmenuID: string, layoutFile: string): T

Show a context menu with a specific id and using the given layout. targetPanelID can be the empty string in which case the cursor position is used to position the context menu. Returns context menu panel.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
contentmenuIDstringNo description provided.
layoutFilestringNo description provided.

ShowCustomLayoutContextMenuParameters

UiToolkitAPI.ShowCustomLayoutContextMenuParameters(targetPanelID: string, contentmenuID: string, layoutFile: string, parameters: string): T

Show a context menu with a specific id and using the given layout and parameters. targetPanelID can be the empty string in which case the cursor position is used to position the context menu. Returns context menu panel.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
contentmenuIDstringNo description provided.
layoutFilestringNo description provided.
parametersstringNo description provided.

ShowCustomLayoutContextMenuParametersDismissEvent

UiToolkitAPI.ShowCustomLayoutContextMenuParametersDismissEvent(targetPanelID: string, contentmenuID: string, layoutFile: string, parameters: string, dismissJsFunc: unknown): T

Show a context menu with a specific id and using the given layout and parameters and call a function when dismissed. targetPanelID can be the empty string in which case the cursor position is used to position the context menu. Returns context menu panel.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
contentmenuIDstringNo description provided.
layoutFilestringNo description provided.
parametersstringNo description provided.
dismissJsFuncunknownNo description provided.

ShowCustomLayoutParametersTooltip

UiToolkitAPI.ShowCustomLayoutParametersTooltip(targetPanelID: string, tooltipID: string, layoutFile: string, parameters: string): boolean

Show a tooltip with a specifix id and using the given layout and parameters.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
tooltipIDstringNo description provided.
layoutFilestringNo description provided.
parametersstringNo description provided.

ShowCustomLayoutParametersTooltipStyled

UiToolkitAPI.ShowCustomLayoutParametersTooltipStyled(targetPanelID: string, tooltipID: string, layoutFile: string, parameters: string, style: string): boolean

Show a tooltip with a specifix id and using the given layout and parameters. Also apply a CSS class named "style" (to the tooltip root panel) in order to allow custom styling (eg. "Tooltip_NoArrow" to remove tooltip's arrow).

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
tooltipIDstringNo description provided.
layoutFilestringNo description provided.
parametersstringNo description provided.
stylestringNo description provided.

ShowCustomLayoutPopup

UiToolkitAPI.ShowCustomLayoutPopup(popupID: string, layoutFile: string): T

Show a popup that lets you specify a layout.

Parameters

NameTypeDescription
popupIDstringNo description provided.
layoutFilestringNo description provided.

ShowCustomLayoutPopupParameters

UiToolkitAPI.ShowCustomLayoutPopupParameters(popupID: string, layoutFile: string, parameters: string): T

Show a popup that lets you specify a layout and parameters.

Parameters

NameTypeDescription
popupIDstringNo description provided.
layoutFilestringNo description provided.
parametersstringNo description provided.

ShowCustomLayoutTooltip

UiToolkitAPI.ShowCustomLayoutTooltip(targetPanelID: string, tooltipID: string, layoutFile: string): boolean

Show a tooltip with a specifix id and using the given layout.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
tooltipIDstringNo description provided.
layoutFilestringNo description provided.

ShowCustomLayoutTooltipStyled

UiToolkitAPI.ShowCustomLayoutTooltipStyled(targetPanelID: string, tooltipID: string, layoutFile: string, style: string): boolean

Show a tooltip with a specifix id and using the given layout. Also apply a CSS class named "style" (to the tooltip root panel) in order to allow custom styling (eg. "Tooltip_NoArrow" to remove tooltip's arrow).

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
tooltipIDstringNo description provided.
layoutFilestringNo description provided.
stylestringNo description provided.

ShowGenericPopup

UiToolkitAPI.ShowGenericPopup(title: string, message: string, style: string): T

Show a popup with the given title add message and optional style. Button present: "OK".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.

ShowGenericPopupBgStyle

UiToolkitAPI.ShowGenericPopupBgStyle(title: string, message: string, style: string, bgStyle: string): T

Show a popup with the given title add message and optional style. You can specify the background style ("none", "dim" or "blur"). Button present: "OK".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
bgStylestringNo description provided.

ShowGenericPopupCancel

UiToolkitAPI.ShowGenericPopupCancel(title: string, message: string, style: string, cancelJSFunc: unknown): T

Show a popup with the given title add message and optional style. Button present: "Cancel".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
cancelJSFuncunknownNo description provided.

ShowGenericPopupCancelBgStyle

UiToolkitAPI.ShowGenericPopupCancelBgStyle(title: string, message: string, style: string, cancelJSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style. You can specify the background style ("none", "dim" or "blur"). Button present: "Cancel".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
cancelJSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupOk

UiToolkitAPI.ShowGenericPopupOk(title: string, message: string, style: string, okJSFunc: unknown): T

Show a popup with the given title add message and optional style. Button present: "OK".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
okJSFuncunknownNo description provided.

ShowGenericPopupOkBgStyle

UiToolkitAPI.ShowGenericPopupOkBgStyle(title: string, message: string, style: string, okJSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style. You can specify the background style ("none", "dim" or "blur"). Button present: "OK".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
okJSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupOkCancel

UiToolkitAPI.ShowGenericPopupOkCancel(title: string, message: string, style: string, okJSFunc: unknown, cancelJSFunc: unknown): T

Show a popup with the given title add message and optional style. Button present: "Ok"/"Cancel".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
okJSFuncunknownNo description provided.
cancelJSFuncunknownNo description provided.

ShowGenericPopupOkCancelBgStyle

UiToolkitAPI.ShowGenericPopupOkCancelBgStyle(title: string, message: string, style: string, okJSFunc: unknown, cancelJSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style. You can specify the background style ("none", "dim" or "blur"). Button present: "Ok"/"Cancel".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
okJSFuncunknownNo description provided.
cancelJSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupOneOption

UiToolkitAPI.ShowGenericPopupOneOption(title: string, message: string, style: string, optionName: string, optionJSFunc: unknown): T

Show a popup with the given title add message and optional style and let you specify the name of one button.

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
optionNamestringNo description provided.
optionJSFuncunknownNo description provided.

ShowGenericPopupOneOptionBgStyle

UiToolkitAPI.ShowGenericPopupOneOptionBgStyle(title: string, message: string, style: string, optionName: string, optionJSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style and let you specify the name of one button. You can specify the background style ("none", "dim" or "blur").

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
optionNamestringNo description provided.
optionJSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupThreeOptions

UiToolkitAPI.ShowGenericPopupThreeOptions(title: string, message: string, style: string, option1Name: string, option1JSFunc: unknown, option2Name: string, option2JSFunc: unknown, option3Name: string, option3JSFunc: unknown): T

Show a popup with the given title add message and optional style and let you specify the name of two button.

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
option1NamestringNo description provided.
option1JSFuncunknownNo description provided.
option2NamestringNo description provided.
option2JSFuncunknownNo description provided.
option3NamestringNo description provided.
option3JSFuncunknownNo description provided.

ShowGenericPopupThreeOptionsBgStyle

UiToolkitAPI.ShowGenericPopupThreeOptionsBgStyle(title: string, message: string, style: string, option1Name: string, option1JSFunc: unknown, option2Name: string, option2JSFunc: unknown, option3Name: string, option3JSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style and let you specify the name of two button. You can specify the background style ("none", "dim" or "blur").

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
option1NamestringNo description provided.
option1JSFuncunknownNo description provided.
option2NamestringNo description provided.
option2JSFuncunknownNo description provided.
option3NamestringNo description provided.
option3JSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupTwoOptions

UiToolkitAPI.ShowGenericPopupTwoOptions(title: string, message: string, style: string, option1Name: string, option1JSFunc: unknown, option2Name: string, option2JSFunc: unknown): T

Show a popup with the given title add message and optional style and let you specify the name of two button.

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
option1NamestringNo description provided.
option1JSFuncunknownNo description provided.
option2NamestringNo description provided.
option2JSFuncunknownNo description provided.

ShowGenericPopupTwoOptionsBgStyle

UiToolkitAPI.ShowGenericPopupTwoOptionsBgStyle(title: string, message: string, style: string, option1Name: string, option1JSFunc: unknown, option2Name: string, option2JSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style and let you specify the name of two button. You can specify the background style ("none", "dim" or "blur").

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
option1NamestringNo description provided.
option1JSFuncunknownNo description provided.
option2NamestringNo description provided.
option2JSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupYesNo

UiToolkitAPI.ShowGenericPopupYesNo(title: string, message: string, style: string, yesJSFunc: unknown, noJSFunc: unknown): T

Show a popup with the given title add message and optional style. Button present: "Yes"/"No".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
yesJSFuncunknownNo description provided.
noJSFuncunknownNo description provided.

ShowGenericPopupYesNoBgStyle

UiToolkitAPI.ShowGenericPopupYesNoBgStyle(title: string, message: string, style: string, yesJSFunc: unknown, noJSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style. You can specify the background style ("none", "dim" or "blur"). Button present: "Yes"/"No".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
yesJSFuncunknownNo description provided.
noJSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGenericPopupYesNoCancel

UiToolkitAPI.ShowGenericPopupYesNoCancel(title: string, message: string, style: string, yesJSFunc: unknown, noJSFunc: unknown, cancelJSFunc: unknown): T

Show a popup with the given title add message and optional style. Button present: "Yes"/"No"/"Cancel".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
yesJSFuncunknownNo description provided.
noJSFuncunknownNo description provided.
cancelJSFuncunknownNo description provided.

ShowGenericPopupYesNoCancelBgStyle

UiToolkitAPI.ShowGenericPopupYesNoCancelBgStyle(title: string, message: string, style: string, yesJSFunc: unknown, noJSFunc: unknown, cancelJSFunc: unknown, bgStyle: string): T

Show a popup with the given title add message and optional style. You can specify the background style ("none", "dim" or "blur"). Button present: "Yes"/"No"/"Cancel".

Parameters

NameTypeDescription
titlestringNo description provided.
messagestringNo description provided.
stylestringNo description provided.
yesJSFuncunknownNo description provided.
noJSFuncunknownNo description provided.
cancelJSFuncunknownNo description provided.
bgStylestringNo description provided.

ShowGlobalCustomLayoutPopup

UiToolkitAPI.ShowGlobalCustomLayoutPopup(popupID: string, layoutFile: string): T

Show a popup on the 'global popups top level window' that lets you specify a layout.

Parameters

NameTypeDescription
popupIDstringNo description provided.
layoutFilestringNo description provided.

ShowGlobalCustomLayoutPopupParameters

UiToolkitAPI.ShowGlobalCustomLayoutPopupParameters(popupID: string, layoutFile: string, parameters: string): T

Show a popup on 'global popups top level window' that lets you specify a layout and parameters.

Parameters

NameTypeDescription
popupIDstringNo description provided.
layoutFilestringNo description provided.
parametersstringNo description provided.

ShowSimpleContextMenu

UiToolkitAPI.ShowSimpleContextMenu(targetPanelID: string, contentmenuID: string, items: UiToolkitAPI.SimpleContextMenuItem[]): T

Show a context menu with a specific id and populate the context menu item list using the given "items" array. targetPanelID can be the empty string in which case the cursor position is used to position the context menu. Returns context menu panel.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
contentmenuIDstringNo description provided.
itemsUiToolkitAPI.SimpleContextMenuItem[]No description provided.

ShowSimpleContextMenuWithDismissEvent

UiToolkitAPI.ShowSimpleContextMenuWithDismissEvent(targetPanelID: string, contentmenuID: string, items: UiToolkitAPI.SimpleContextMenuItem[], dismissJsFunc: unknown): T

Show a context menu with a specific id and populate the context menu item list using the given "items" array. targetPanelID can be the empty string in which case the cursor position is used to position the context menu. Returns context menu panel.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
contentmenuIDstringNo description provided.
itemsUiToolkitAPI.SimpleContextMenuItem[]No description provided.
dismissJsFuncunknownNo description provided.

ShowTextTooltip

UiToolkitAPI.ShowTextTooltip(targetPanelID: string, text: string): boolean

Show a tooltip with the given text

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
textstringNo description provided.

ShowTextTooltipOnPanel

UiToolkitAPI.ShowTextTooltipOnPanel(targetPanel: unknown, text: string): boolean

Show a tooltip with the given text on given panel

Parameters

NameTypeDescription
targetPanelunknownNo description provided.
textstringNo description provided.

ShowTextTooltipOnPanelStyled

UiToolkitAPI.ShowTextTooltipOnPanelStyled(targetPanel: unknown, text: string, style: string): boolean

Show a tooltip with the given text on given panel. Also apply a CSS class named "style" to allow custom styling.

Parameters

NameTypeDescription
targetPanelunknownNo description provided.
textstringNo description provided.
stylestringNo description provided.

ShowTextTooltipStyled

UiToolkitAPI.ShowTextTooltipStyled(targetPanelID: string, text: string, style: string): boolean

Show a tooltip with the given text. Also apply a CSS class named "style" to allow custom styling.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
textstringNo description provided.
stylestringNo description provided.

ShowTitleImageTextTooltip

UiToolkitAPI.ShowTitleImageTextTooltip(targetPanelID: string, title: string, image: string, text: string): boolean

Show a tooltip with the given title, image and text.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
titlestringNo description provided.
imagestringNo description provided.
textstringNo description provided.

ShowTitleImageTextTooltipStyled

UiToolkitAPI.ShowTitleImageTextTooltipStyled(targetPanelID: string, title: string, image: string, text: string, style: string): boolean

Show a tooltip with the giben title, image and text. Also apply a CSS class named "style" to allow custom styling.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
titlestringNo description provided.
imagestringNo description provided.
textstringNo description provided.
stylestringNo description provided.

ShowTitleTextTooltip

UiToolkitAPI.ShowTitleTextTooltip(targetPanelID: string, title: string, text: string): boolean

Show a tooltip with the given title and text.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
titlestringNo description provided.
textstringNo description provided.

ShowTitleTextTooltipStyled

UiToolkitAPI.ShowTitleTextTooltipStyled(targetPanelID: string, title: string, text: string, style: string): boolean

Show a tooltip with the given title and text. Also apply a CSS class named "style" to allow custom styling.

Parameters

NameTypeDescription
targetPanelIDstringNo description provided.
titlestringNo description provided.
textstringNo description provided.
stylestringNo description provided.

UnregisterJSCallback

UiToolkitAPI.UnregisterJSCallback(jsCallbackHandle: number): void

Unregister a javascript callback previously registered with RegisterJSCallback.

Parameter

NameTypeDescription
jsCallbackHandlenumberNo description provided.