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

Name Type Description
panelPtr GenericPanel No description provided.
strDebugContextName string No 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

Name Type Description
panelPtr GenericPanel No description provided.
strDebugContextName string No 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

Name Type Description
tooltipID string No 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

Name Type Description
callback number No description provided.
...args any[] No description provided.

IsPanoramaInECOMode

UiToolkitAPI.IsPanoramaInECOMode(): boolean

Is Panorama in ECO (perf) mode

MakeStringSafe

UiToolkitAPI.MakeStringSafe(str: string): string

No description provided.

Parameter

Name Type Description
str string No description provided.

ProfilingScopeBegin

UiToolkitAPI.ProfilingScopeBegin(tagName: string): void

Notify telemetry that a zone is been entered

Parameter

Name Type Description
tagName string No 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

Name Type Description
panelTypeName string No description provided.
layoutFile string No 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

Name Type Description
callback Func<any[], void> No description provided.

RegisterPanel2d

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

Register a panel type name with the corresponding layout file

Parameters

Name Type Description
panelTypeName string No description provided.
layoutFile string No description provided.

ReleaseDenyAllInputToGame

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

ReleaseDenyAllInputToGame takes a handle as parameters previously returned by AddDenyAllInputToGame

Parameter

Name Type Description
handle string | number No description provided.

ReleaseDenyMouseInputToGame

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

ReleaseDenyMouseInputToGame takes a handle as parameters previously returned by AddDenyMouseInputToGame

Parameter

Name Type Description
handle string | number No 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

Name Type Description
targetPanelID string No description provided.
contentmenuID string No description provided.
layoutFile string No 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

Name Type Description
targetPanelID string No description provided.
contentmenuID string No description provided.
layoutFile string No description provided.
parameters string No 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

Name Type Description
targetPanelID string No description provided.
contentmenuID string No description provided.
layoutFile string No description provided.
parameters string No description provided.
dismissJsFunc unknown No 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

Name Type Description
targetPanelID string No description provided.
tooltipID string No description provided.
layoutFile string No description provided.
parameters string No 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

Name Type Description
targetPanelID string No description provided.
tooltipID string No description provided.
layoutFile string No description provided.
parameters string No description provided.
style string No description provided.

ShowCustomLayoutPopup

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

Show a popup that lets you specify a layout.

Parameters

Name Type Description
popupID string No description provided.
layoutFile string No description provided.

ShowCustomLayoutPopupParameters

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

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

Parameters

Name Type Description
popupID string No description provided.
layoutFile string No description provided.
parameters string No 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

Name Type Description
targetPanelID string No description provided.
tooltipID string No description provided.
layoutFile string No 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

Name Type Description
targetPanelID string No description provided.
tooltipID string No description provided.
layoutFile string No description provided.
style string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
cancelJSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
cancelJSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
okJSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
okJSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
okJSFunc unknown No description provided.
cancelJSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
okJSFunc unknown No description provided.
cancelJSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
optionName string No description provided.
optionJSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
optionName string No description provided.
optionJSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
option1Name string No description provided.
option1JSFunc unknown No description provided.
option2Name string No description provided.
option2JSFunc unknown No description provided.
option3Name string No description provided.
option3JSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
option1Name string No description provided.
option1JSFunc unknown No description provided.
option2Name string No description provided.
option2JSFunc unknown No description provided.
option3Name string No description provided.
option3JSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
option1Name string No description provided.
option1JSFunc unknown No description provided.
option2Name string No description provided.
option2JSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
option1Name string No description provided.
option1JSFunc unknown No description provided.
option2Name string No description provided.
option2JSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
yesJSFunc unknown No description provided.
noJSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
yesJSFunc unknown No description provided.
noJSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
yesJSFunc unknown No description provided.
noJSFunc unknown No description provided.
cancelJSFunc unknown No 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

Name Type Description
title string No description provided.
message string No description provided.
style string No description provided.
yesJSFunc unknown No description provided.
noJSFunc unknown No description provided.
cancelJSFunc unknown No description provided.
bgStyle string No 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

Name Type Description
popupID string No description provided.
layoutFile string No 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

Name Type Description
popupID string No description provided.
layoutFile string No description provided.
parameters string No 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

Name Type Description
targetPanelID string No description provided.
contentmenuID string No description provided.
items UiToolkitAPI.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

Name Type Description
targetPanelID string No description provided.
contentmenuID string No description provided.
items UiToolkitAPI.SimpleContextMenuItem[] No description provided.
dismissJsFunc unknown No description provided.

ShowTextTooltip

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

Show a tooltip with the given text

Parameters

Name Type Description
targetPanelID string No description provided.
text string No description provided.

ShowTextTooltipOnPanel

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

Show a tooltip with the given text on given panel

Parameters

Name Type Description
targetPanel unknown No description provided.
text string No 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

Name Type Description
targetPanel unknown No description provided.
text string No description provided.
style string No 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

Name Type Description
targetPanelID string No description provided.
text string No description provided.
style string No 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

Name Type Description
targetPanelID string No description provided.
title string No description provided.
image string No description provided.
text string No 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

Name Type Description
targetPanelID string No description provided.
title string No description provided.
image string No description provided.
text string No description provided.
style string No description provided.

ShowTitleTextTooltip

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

Show a tooltip with the given title and text.

Parameters

Name Type Description
targetPanelID string No description provided.
title string No description provided.
text string No 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

Name Type Description
targetPanelID string No description provided.
title string No description provided.
text string No description provided.
style string No description provided.

UnregisterJSCallback

UiToolkitAPI.UnregisterJSCallback(jsCallbackHandle: number): void

Unregister a javascript callback previously registered with RegisterJSCallback.

Parameter

Name Type Description
jsCallbackHandle number No description provided.