Skip to content

Class: MockCUIMapList ​

Mock base window class.

Extends ​

Implements ​

  • CUIMapList

Accessors ​

__name ​

Get Signature ​

ts
get __name(): string;
Returns ​

string

Implementation of ​

ts
CUIMapList.__name

Inherited from ​

MockCUIWindow.__name


__name ​

Get Signature ​

ts
get static __name(): string;
Returns ​

string

Inherited from ​

MockCUIWindow.__name

Constructors ​

Constructor ​

ts
new MockCUIMapList(): MockCUIMapList;

Returns ​

MockCUIMapList

Inherited from ​

MockCUIWindow.constructor

Methods ​

GetHeight() ​

ts
GetHeight(): number;

Returns ​

number

Window height.

Implementation of ​

ts
CUIMapList.GetHeight

Inherited from ​

MockCUIWindow.GetHeight


GetWidth() ​

ts
GetWidth(): number;

Returns ​

number

Window width.

Implementation of ​

ts
CUIMapList.GetWidth

Inherited from ​

MockCUIWindow.GetWidth


OnKeyboard() ​

ts
OnKeyboard(): boolean;

Returns ​

boolean

Inherited from ​

MockCUIWindow.OnKeyboard


Show() ​

ts
Show(isShown: boolean): void;

Show or hide the window.

Parameters ​

ParameterType
isShownboolean

Returns ​

void

Remarks ​

Visibility does not attach, detach, enable, or disable the window.

Implementation of ​

ts
CUIMapList.Show

Inherited from ​

MockCUIWindow.Show


create() ​

ts
static create(): MockCUIMapList;

Returns ​

MockCUIMapList

Overrides ​

MockCUIWindow.create


mock() ​

ts
static mock(): CUIMapList;

Returns ​

CUIMapList

Overrides ​

MockCUIWindow.mock

Properties ​

AttachChild ​

ts
AttachChild: Mock<(window: CUIWindow) => void>;

Attach a child window.

Remarks ​

The Lua binding adopts child; after attachment, treat the parent as owning its lifetime.

Param ​

child

Child window.

Implementation of ​

ts
CUIMapList.AttachChild

Inherited from ​

MockCUIWindow.AttachChild


children ​

ts
children: CUIWindow[] = [];

Inherited from ​

MockCUIWindow.children


ClearList ​

ts
ClearList: Mock<() => void>;

Clear map entries.

Implementation of ​

ts
CUIMapList.ClearList

commandLine ​

ts
commandLine: string = "";

DetachChild ​

ts
DetachChild: Mock<(window: CUIWindow) => void>;

Detach a child window.

Remarks ​

Detaching removes the parent relation. It does not reinitialize the window or attach it elsewhere.

Param ​

child

Child window.

Implementation of ​

ts
CUIMapList.DetachChild

Inherited from ​

MockCUIWindow.DetachChild


Enable ​

ts
Enable: Mock<(isEnabled: boolean) => void>;

Enable or disable interaction.

Remarks ​

Enabled state and visibility are separate. Hidden controls can still be enabled.

Param ​

is_enabled

Whether the window should be enabled.

Implementation of ​

ts
CUIMapList.Enable

Inherited from ​

MockCUIWindow.Enable


focusReceiveTime ​

ts
focusReceiveTime: number = 0;

Inherited from ​

MockCUIWindow.focusReceiveTime


FocusReceiveTime ​

ts
FocusReceiveTime: Mock<() => number>;

Returns ​

Level time when this window received focus.

Implementation of ​

ts
CUIMapList.FocusReceiveTime

Inherited from ​

MockCUIWindow.FocusReceiveTime


gameType ​

ts
gameType: TXR_GAME_TYPE;

GetAbsoluteRect ​

ts
GetAbsoluteRect: Mock<() => Frect>;

Returns ​

Window rectangle in screen coordinates.

Implementation of ​

ts
CUIMapList.GetAbsoluteRect

Inherited from ​

MockCUIWindow.GetAbsoluteRect


GetCommandLine ​

ts
GetCommandLine: <T>(value: string) => T;

Build a command-line value for the selected map settings.

Type Parameters ​

Type ParameterDefault type
T extends stringstring

Parameters ​

ParameterTypeDescription
valuestringBase command-line value.

Returns ​

T

Command-line value.

Implementation of ​

ts
CUIMapList.GetCommandLine

GetCurGameType ​

ts
GetCurGameType: Mock<() => TXR_GAME_TYPE>;

Returns ​

Current multiplayer game type.

Implementation of ​

ts
CUIMapList.GetCurGameType

GetFont ​

ts
GetFont: Mock<() => CGameFont>;

Get the font assigned to this window.

Remarks ​

Text controls need a font assigned before drawing custom text reliably.

Returns ​

Font assigned to this window.

Implementation of ​

ts
CUIMapList.GetFont

Inherited from ​

MockCUIWindow.GetFont


GetMouseX ​

ts
GetMouseX: Mock<() => number>;

Get cursor X coordinate stored on this window.

Since ​

OpenXRay 2026-01-01, e3b0e3c5, PR #2028

Source ​

src/xrUICore/ui_export_script.cpp, CUIWindow.GetMouseX binding.

Returns ​

Current cursor X coordinate.

Implementation of ​

ts
CUIMapList.GetMouseX

Inherited from ​

MockCUIWindow.GetMouseX


GetMouseY ​

ts
GetMouseY: Mock<() => number>;

Get cursor Y coordinate stored on this window.

Since ​

OpenXRay 2026-01-01, e3b0e3c5, PR #2028

Source ​

src/xrUICore/ui_export_script.cpp, CUIWindow.GetMouseY binding.

Returns ​

Current cursor Y coordinate.

Implementation of ​

ts
CUIMapList.GetMouseY

Inherited from ​

MockCUIWindow.GetMouseY


GetWndPos ​

ts
GetWndPos: Mock<() => vector2>;

Returns ​

Window position relative to its parent.

Implementation of ​

ts
CUIMapList.GetWndPos

Inherited from ​

MockCUIWindow.GetWndPos


Init ​

ts
Init: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;

Initialize window rectangle.

Param ​

frect

Window rectangle.

Implementation of ​

ts
CUIMapList.Init

Inherited from ​

MockCUIWindow.Init


isAutoDelete ​

ts
isAutoDelete: boolean = false;

Inherited from ​

MockCUIWindow.isAutoDelete


IsAutoDelete ​

ts
IsAutoDelete: Mock<() => boolean>;

Returns ​

Whether the engine owns and deletes this window with its parent.

Implementation of ​

ts
CUIMapList.IsAutoDelete

Inherited from ​

MockCUIWindow.IsAutoDelete


IsCursorOverWindow ​

ts
IsCursorOverWindow: Mock<() => boolean>;

Returns ​

Whether the UI cursor is currently over this window.

Implementation of ​

ts
CUIMapList.IsCursorOverWindow

Inherited from ​

MockCUIWindow.IsCursorOverWindow


isEmpty ​

ts
isEmpty: boolean = true;

IsEmpty ​

ts
IsEmpty: Mock<() => boolean>;

Returns ​

Whether the map list has no entries.

Implementation of ​

ts
CUIMapList.IsEmpty

isEnabled ​

ts
isEnabled: boolean = false;

Inherited from ​

MockCUIWindow.isEnabled


IsEnabled ​

ts
IsEnabled: Mock<() => boolean>;

Returns ​

Whether the window accepts interaction.

Implementation of ​

ts
CUIMapList.IsEnabled

Inherited from ​

MockCUIWindow.IsEnabled


isPostProcessMode ​

ts
isPostProcessMode: boolean = false;

Inherited from ​

MockCUIWindow.isPostProcessMode


isShown ​

ts
isShown: boolean = false;

Inherited from ​

MockCUIWindow.isShown


IsShown ​

ts
IsShown: Mock<() => boolean>;

Returns ​

Whether the window is visible.

Implementation of ​

ts
CUIMapList.IsShown

Inherited from ​

MockCUIWindow.IsShown


LoadMapList ​

ts
LoadMapList: Mock<() => void>;

Load available maps.

Implementation of ​

ts
CUIMapList.LoadMapList

mouseX ​

ts
mouseX: number = 0;

Inherited from ​

MockCUIWindow.mouseX


mouseY ​

ts
mouseY: number = 0;

Inherited from ​

MockCUIWindow.mouseY


OnModeChange ​

ts
OnModeChange: Mock<UnknownFunction>;

Refresh list state after game mode changes.

Implementation of ​

ts
CUIMapList.OnModeChange

ResetPPMode ​

ts
ResetPPMode: Mock<() => void>;

Disable post-process mode for this window.

Remarks ​

Pair with CUIWindow.SetPPMode when a window no longer needs post-process rendering.

Implementation of ​

ts
CUIMapList.ResetPPMode

Inherited from ​

MockCUIWindow.ResetPPMode


SaveMapList ​

ts
SaveMapList: Mock<UnknownFunction>;

Save current map list settings.

Implementation of ​

ts
CUIMapList.SaveMapList

serverParams ​

ts
serverParams: string = "";

SetAutoDelete ​

ts
SetAutoDelete: Mock<(isAutoDelete: boolean) => void>;

Set whether the parent owns this child window.

Remarks ​

Use this for script-created windows that are attached to a parent and should be cleaned up with the UI tree.

Param ​

auto_delete

Whether the engine should delete the child automatically.

Implementation of ​

ts
CUIMapList.SetAutoDelete

Inherited from ​

MockCUIWindow.SetAutoDelete


SetFont ​

ts
SetFont: Mock<(font: CGameFont) => void>;

Set the font used by this window.

Param ​

font

Font object.

Implementation of ​

ts
CUIMapList.SetFont

Inherited from ​

MockCUIWindow.SetFont


SetHeight ​

ts
SetHeight: Mock<(height: number) => void>;

Set window height.

Param ​

height

New height.

Implementation of ​

ts
CUIMapList.SetHeight

Inherited from ​

MockCUIWindow.SetHeight


SetMapInfo ​

ts
SetMapInfo: Mock<UnknownFunction>;

Set the map info panel updated by this list.

Param ​

info

Map info control.

Implementation of ​

ts
CUIMapList.SetMapInfo

SetMapPic ​

ts
SetMapPic: Mock<UnknownFunction>;

Set the map preview image control.

Param ​

picture

Static image control.

Implementation of ​

ts
CUIMapList.SetMapPic

SetModeSelector ​

ts
SetModeSelector: Mock<UnknownFunction>;

Set game mode selector control.

Param ​

modeSelector

Mode selector.

Implementation of ​

ts
CUIMapList.SetModeSelector

SetPPMode ​

ts
SetPPMode: Mock<() => void>;

Enable post-process mode for this window.

Remarks ​

Use for windows meant to be drawn through the post-process UI path, and reset it when the window returns to normal UI rendering.

Implementation of ​

ts
CUIMapList.SetPPMode

Inherited from ​

MockCUIWindow.SetPPMode


SetServerParams ​

ts
SetServerParams: Mock<(params: string) => void>;

Set server launch parameters.

Param ​

params

Server parameter string.

Implementation of ​

ts
CUIMapList.SetServerParams

SetWeatherSelector ​

ts
SetWeatherSelector: Mock<UnknownFunction>;

Set weather selector control.

Param ​

selector

Weather selector.

Implementation of ​

ts
CUIMapList.SetWeatherSelector

SetWidth ​

ts
SetWidth: Mock<(width: number) => void>;

Set window width.

Param ​

width

New width.

Implementation of ​

ts
CUIMapList.SetWidth

Inherited from ​

MockCUIWindow.SetWidth


SetWindowName ​

ts
SetWindowName: Mock<(name: string) => void>;

Set debug/window name.

Param ​

name

Window name.

Implementation of ​

ts
CUIMapList.SetWindowName

Inherited from ​

MockCUIWindow.SetWindowName


SetWndPos ​

ts
SetWndPos: Mock<(positionOrX: number | vector2, y?: number) => void>;

Set window position.

Param ​

vector2

New position.

Implementation of ​

ts
CUIMapList.SetWndPos

Inherited from ​

MockCUIWindow.SetWndPos


SetWndRect ​

ts
SetWndRect: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;

Set window rectangle.

Param ​

rect

New rectangle.

Implementation of ​

ts
CUIMapList.SetWndRect

Inherited from ​

MockCUIWindow.SetWndRect


SetWndSize ​

ts
SetWndSize: Mock<(sizeOrWidth: number | vector2, height?: number) => void>;

Set window size.

Param ​

vector2

New size.

Implementation of ​

ts
CUIMapList.SetWndSize

Inherited from ​

MockCUIWindow.SetWndSize


StartDedicatedServer ​

ts
StartDedicatedServer: Mock<UnknownFunction>;

Start a dedicated server with selected settings.

Implementation of ​

ts
CUIMapList.StartDedicatedServer

windowFont ​

ts
windowFont: CGameFont | null = null;

Inherited from ​

MockCUIWindow.windowFont


windowName ​

ts
windowName: string | null = null;

Inherited from ​

MockCUIWindow.windowName


WindowName ​

ts
WindowName: Mock<() => string>;

Returns ​

Window name.

Implementation of ​

ts
CUIMapList.WindowName

Inherited from ​

MockCUIWindow.WindowName


windowPosition ​

ts
windowPosition: vector2;

Inherited from ​

MockCUIWindow.windowPosition


windowRect ​

ts
windowRect: Frect | null = null;

Inherited from ​

MockCUIWindow.windowRect


windowSize ​

ts
windowSize: vector2;

Inherited from ​

MockCUIWindow.windowSize