Class: MockCUIListBoxItemMsgChain
Mock UI list box message chain.
Extends
Implements
CUIListBoxItemMsgChain
Accessors
__name
Get Signature
get __name(): string;Returns
string
Implementation of
CUIListBoxItemMsgChain.__nameInherited from
__name
Get Signature
get static __name(): string;Returns
string
Inherited from
Constructors
Constructor
new MockCUIListBoxItemMsgChain(): MockCUIListBoxItemMsgChain;Returns
MockCUIListBoxItemMsgChain
Inherited from
MockCUIListBoxItem.constructor
Methods
GetHeight()
GetHeight(): number;Returns
number
Window height.
Implementation of
CUIListBoxItemMsgChain.GetHeightInherited from
GetWidth()
GetWidth(): number;Returns
number
Window width.
Implementation of
CUIListBoxItemMsgChain.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
CUIListBoxItemMsgChain.ShowInherited from
create()
static create(): MockCUIListBoxItemMsgChain;Returns
MockCUIListBoxItemMsgChain
Overrides
mock()
static mock(): CUIListBoxItemMsgChain;Returns
CUIListBoxItemMsgChain
Overrides
Properties
AddIconField
AddIconField: Mock<(_value?: number) => CUIStatic>;Add an icon field to the item.
Param
value
Field width.
Returns
Created static field.
Implementation of
CUIListBoxItemMsgChain.AddIconFieldInherited from
MockCUIListBoxItem.AddIconField
AddTextField
AddTextField: Mock<(text: string, _width?: number) => CUITextWnd>;Add a text field to the item.
Param
text
Field text.
Param
width
Field width.
Returns
Created text window.
Implementation of
CUIListBoxItemMsgChain.AddTextFieldInherited from
MockCUIListBoxItem.AddTextField
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
CUIListBoxItemMsgChain.AttachChildInherited from
MockCUIListBoxItem.AttachChild
children
children: CUIWindow[] = [];Inherited from
DetachChild
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
CUIListBoxItemMsgChain.DetachChildInherited from
MockCUIListBoxItem.DetachChild
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
CUIListBoxItemMsgChain.EnableInherited from
focusReceiveTime
focusReceiveTime: number = 0;Inherited from
MockCUIListBoxItem.focusReceiveTime
FocusReceiveTime
FocusReceiveTime: Mock<() => number>;Returns
Level time when this window received focus.
Implementation of
CUIListBoxItemMsgChain.FocusReceiveTimeInherited from
MockCUIListBoxItem.FocusReceiveTime
GetAbsoluteRect
GetAbsoluteRect: Mock<() => Frect>;Returns
Window rectangle in screen coordinates.
Implementation of
CUIListBoxItemMsgChain.GetAbsoluteRectInherited from
MockCUIListBoxItem.GetAbsoluteRect
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
CUIListBoxItemMsgChain.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
CUIListBoxItemMsgChain.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
CUIListBoxItemMsgChain.GetMouseYInherited from
GetTextItem
GetTextItem: Mock<() => CUITextWnd>;Returns
Main text item.
Implementation of
CUIListBoxItemMsgChain.GetTextItemInherited from
MockCUIListBoxItem.GetTextItem
GetWndPos
GetWndPos: Mock<() => vector2>;Returns
Window position relative to its parent.
Implementation of
CUIListBoxItemMsgChain.GetWndPosInherited from
iconItem?
optional iconItem?: CUIStatic;Inherited from
Init
Init: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;Initialize window rectangle.
Param
frect
Window rectangle.
Implementation of
CUIListBoxItemMsgChain.InitInherited from
isAutoDelete
isAutoDelete: boolean = false;Inherited from
MockCUIListBoxItem.isAutoDelete
IsAutoDelete
IsAutoDelete: Mock<() => boolean>;Returns
Whether the engine owns and deletes this window with its parent.
Implementation of
CUIListBoxItemMsgChain.IsAutoDeleteInherited from
MockCUIListBoxItem.IsAutoDelete
IsCursorOverWindow
IsCursorOverWindow: Mock<() => boolean>;Returns
Whether the UI cursor is currently over this window.
Implementation of
CUIListBoxItemMsgChain.IsCursorOverWindowInherited from
MockCUIListBoxItem.IsCursorOverWindow
isEnabled
isEnabled: boolean = false;Inherited from
IsEnabled
IsEnabled: Mock<() => boolean>;Returns
Whether the window accepts interaction.
Implementation of
CUIListBoxItemMsgChain.IsEnabledInherited from
isPostProcessMode
isPostProcessMode: boolean = false;Inherited from
MockCUIListBoxItem.isPostProcessMode
isShown
isShown: boolean = false;Inherited from
IsShown
IsShown: Mock<() => boolean>;Returns
Whether the window is visible.
Implementation of
CUIListBoxItemMsgChain.IsShownInherited from
mouseX
mouseX: number = 0;Inherited from
mouseY
mouseY: number = 0;Inherited from
ResetPPMode
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
CUIListBoxItemMsgChain.ResetPPModeInherited from
MockCUIListBoxItem.ResetPPMode
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
CUIListBoxItemMsgChain.SetAutoDeleteInherited from
MockCUIListBoxItem.SetAutoDelete
SetColor
SetColor: Mock<UnknownFunction>;Set frame line color.
Param
color
ARGB color.
Implementation of
CUIListBoxItemMsgChain.SetColorInherited from
SetFont
SetFont: Mock<(font: CGameFont) => void>;Set the font used by this window.
Param
font
Font object.
Implementation of
CUIListBoxItemMsgChain.SetFontInherited from
SetHeight
SetHeight: Mock<(height: number) => void>;Set window height.
Param
height
New height.
Implementation of
CUIListBoxItemMsgChain.SetHeightInherited from
SetPPMode
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
CUIListBoxItemMsgChain.SetPPModeInherited from
SetTextColor
SetTextColor: Mock<UnknownFunction>;Set item text color.
Param
color
ARGB color.
Implementation of
CUIListBoxItemMsgChain.SetTextColorInherited from
MockCUIListBoxItem.SetTextColor
SetWidth
SetWidth: Mock<(width: number) => void>;Set window width.
Param
width
New width.
Implementation of
CUIListBoxItemMsgChain.SetWidthInherited from
SetWindowName
SetWindowName: Mock<(name: string) => void>;Set debug/window name.
Param
name
Window name.
Implementation of
CUIListBoxItemMsgChain.SetWindowNameInherited from
MockCUIListBoxItem.SetWindowName
SetWndPos
SetWndPos: Mock<(positionOrX: number | vector2, y?: number) => void>;Set window position.
Param
vector2
New position.
Implementation of
CUIListBoxItemMsgChain.SetWndPosInherited from
SetWndRect
SetWndRect: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;Set window rectangle.
Param
rect
New rectangle.
Implementation of
CUIListBoxItemMsgChain.SetWndRectInherited from
SetWndSize
SetWndSize: Mock<(sizeOrWidth: number | vector2, height?: number) => void>;Set window size.
Param
vector2
New size.
Implementation of
CUIListBoxItemMsgChain.SetWndSizeInherited from
textField?
optional textField?: CUITextWnd;Inherited from
textItem
textItem: CUITextWnd;Inherited from
windowFont
windowFont: CGameFont | null = null;Inherited from
windowName
windowName: string | null = null;Inherited from
WindowName
WindowName: Mock<() => string>;Returns
Window name.
Implementation of
CUIListBoxItemMsgChain.WindowNameInherited from
windowPosition
windowPosition: vector2;Inherited from
MockCUIListBoxItem.windowPosition
windowRect
windowRect: Frect | null = null;Inherited from
windowSize
windowSize: vector2;