Class: MockCServerList
Mock server list UI component.
Extends
Implements
CServerList
Accessors
__name
Get Signature
get __name(): string;Returns
string
Implementation of
CServerList.__nameInherited from
__name
Get Signature
get static __name(): string;Returns
string
Inherited from
Constructors
Constructor
new MockCServerList(): MockCServerList;Returns
MockCServerList
Inherited from
Methods
GetHeight()
GetHeight(): number;Returns
number
Window height.
Implementation of
CServerList.GetHeightInherited from
GetWidth()
GetWidth(): number;Returns
number
Window width.
Implementation of
CServerList.GetWidthInherited from
OnKeyboard()
OnKeyboard(): boolean;Returns
boolean
Inherited from
Show()
Show(isShown: boolean): void;Show or hide the window.
Parameters
| Parameter | Type |
|---|---|
isShown | boolean |
Returns
void
Remarks
Visibility does not attach, detach, enable, or disable the window.
Implementation of
CServerList.ShowInherited from
create()
static create(): MockCServerList;Returns
MockCServerList
Overrides
mock()
static mock(): CServerList;Returns
CServerList
Overrides
Properties
AttachChild
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
CServerList.AttachChildInherited from
children
children: CUIWindow[] = [];Inherited from
ConnectToSelected
ConnectToSelected: Mock<UnknownFunction>;Connect to the selected server.
Remarks
Requires a selected server row in the current list.
Implementation of
CServerList.ConnectToSelectedDetachChild
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
CServerList.DetachChildInherited from
Enable
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
CServerList.EnableInherited from
focusReceiveTime
focusReceiveTime: number = 0;Inherited from
MockCUIWindow.focusReceiveTime
FocusReceiveTime
FocusReceiveTime: Mock<() => number>;Returns
Level time when this window received focus.
Implementation of
CServerList.FocusReceiveTimeInherited from
MockCUIWindow.FocusReceiveTime
GetAbsoluteRect
GetAbsoluteRect: Mock<() => Frect>;Returns
Window rectangle in screen coordinates.
Implementation of
CServerList.GetAbsoluteRectInherited from
GetFont
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
CServerList.GetFontInherited from
GetMouseX
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
CServerList.GetMouseXInherited from
GetMouseY
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
CServerList.GetMouseYInherited from
GetWndPos
GetWndPos: Mock<() => vector2>;Returns
Window position relative to its parent.
Implementation of
CServerList.GetWndPosInherited from
Init
Init: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;Initialize window rectangle.
Param
frect
Window rectangle.
Implementation of
CServerList.InitInherited from
isAutoDelete
isAutoDelete: boolean = false;Inherited from
IsAutoDelete
IsAutoDelete: Mock<() => boolean>;Returns
Whether the engine owns and deletes this window with its parent.
Implementation of
CServerList.IsAutoDeleteInherited from
IsCursorOverWindow
IsCursorOverWindow: Mock<() => boolean>;Returns
Whether the UI cursor is currently over this window.
Implementation of
CServerList.IsCursorOverWindowInherited from
MockCUIWindow.IsCursorOverWindow
isEnabled
isEnabled: boolean = false;Inherited from
IsEnabled
IsEnabled: Mock<() => boolean>;Returns
Whether the window accepts interaction.
Implementation of
CServerList.IsEnabledInherited from
isPostProcessMode
isPostProcessMode: boolean = false;Inherited from
MockCUIWindow.isPostProcessMode
isShown
isShown: boolean = false;Inherited from
IsShown
IsShown: Mock<() => boolean>;Returns
Whether the window is visible.
Implementation of
CServerList.IsShownInherited from
mouseX
mouseX: number = 0;Inherited from
mouseY
mouseY: number = 0;Inherited from
NetRadioChanged
NetRadioChanged: Mock<UnknownFunction>;Switch between internet and LAN server sources.
Param
value
Whether network radio mode is enabled.
Implementation of
CServerList.NetRadioChangedplayerName
playerName: string = "";RefreshList
RefreshList: Mock<UnknownFunction>;Refresh the server list.
Param
value
Whether to force a refresh.
Implementation of
CServerList.RefreshListRefreshQuick
RefreshQuick: Mock<UnknownFunction>;Refresh the quick server list view.
Implementation of
CServerList.RefreshQuickResetPPMode
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
CServerList.ResetPPModeInherited from
SetAutoDelete
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
CServerList.SetAutoDeleteInherited from
SetConnectionErrCb
SetConnectionErrCb: Mock<UnknownFunction>;Set callback for connection errors.
Remarks
Keep the callback object alive for as long as the server list may report connection failures.
Param
cb
Error callback.
Implementation of
CServerList.SetConnectionErrCbSetFilters
SetFilters: Mock<UnknownFunction>;Apply server browser filters.
Param
filters
Filter settings.
Implementation of
CServerList.SetFiltersSetFont
SetFont: Mock<(font: CGameFont) => void>;Set the font used by this window.
Param
font
Font object.
Implementation of
CServerList.SetFontInherited from
SetHeight
SetHeight: Mock<(height: number) => void>;Set window height.
Param
height
New height.
Implementation of
CServerList.SetHeightInherited from
SetPlayerName
SetPlayerName: Mock<(name: string) => void>;Set the player name used for server browser queries.
Param
name
Player name.
Implementation of
CServerList.SetPlayerNameSetPPMode
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
CServerList.SetPPModeInherited from
SetSortFunc
SetSortFunc: Mock<UnknownFunction>;Set server list sorting.
Param
sort_column
Column or field name to sort by.
Param
ascending
Whether sorting is ascending.
Implementation of
CServerList.SetSortFuncSetWidth
SetWidth: Mock<(width: number) => void>;Set window width.
Param
width
New width.
Implementation of
CServerList.SetWidthInherited from
SetWindowName
SetWindowName: Mock<(name: string) => void>;Set debug/window name.
Param
name
Window name.
Implementation of
CServerList.SetWindowNameInherited from
SetWndPos
SetWndPos: Mock<(positionOrX: number | vector2, y?: number) => void>;Set window position.
Param
vector2
New position.
Implementation of
CServerList.SetWndPosInherited from
SetWndRect
SetWndRect: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;Set window rectangle.
Param
rect
New rectangle.
Implementation of
CServerList.SetWndRectInherited from
SetWndSize
SetWndSize: Mock<(sizeOrWidth: number | vector2, height?: number) => void>;Set window size.
Param
vector2
New size.
Implementation of
CServerList.SetWndSizeInherited from
ShowServerInfo
ShowServerInfo: Mock<UnknownFunction>;Show details for the selected server.
Implementation of
CServerList.ShowServerInfowindowFont
windowFont: CGameFont | null = null;Inherited from
windowName
windowName: string | null = null;Inherited from
WindowName
WindowName: Mock<() => string>;Returns
Window name.
Implementation of
CServerList.WindowNameInherited from
windowPosition
windowPosition: vector2;Inherited from
windowRect
windowRect: Frect | null = null;Inherited from
windowSize
windowSize: vector2;Inherited from
ece_unique_nick_expired
readonly static ece_unique_nick_expired: number = 2;Engine enum value for CServerList.ece_unique_nick_expired.
ece_unique_nick_not_registred
readonly static ece_unique_nick_not_registred: number = 1;Engine enum value for CServerList.ece_unique_nick_not_registred.