Skip to content

Class: CUIListWnd ​

UI binding for CUIListWnd.

Source ​

C++ class CUIListWnd : CUIWindow

Custom Constructor ​

CUIListWnd

Remarks ​

Items added through the script binding are adopted by the list window.

Extends ​

Constructors ​

Constructor ​

ts
new CUIListWnd(): CUIListWnd;

Create an empty UI window.

Returns ​

CUIListWnd

Inherited from ​

CUIWindow.constructor

Methods ​

ActivateList() ​

ts
ActivateList(flag: boolean): void;

Activate or deactivate the list.

Parameters ​

ParameterTypeDescription
flagbooleanNew active state.

Returns ​

void


AddItem() ​

ts
AddItem(item: CUIListItem): boolean;

Add an item and transfer it to the list.

Parameters ​

ParameterTypeDescription
itemCUIListItemItem to add.

Returns ​

boolean

Whether the item was added.

Remarks ​

The Lua binding adopts item; the list owns it after a successful add.


AttachChild() ​

ts
AttachChild(child: CUIWindow): void;

Attach a child window.

Parameters ​

ParameterTypeDescription
childCUIWindowChild window.

Returns ​

void

Remarks ​

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

Inherited from ​

CUIWindow.AttachChild


DetachChild() ​

ts
DetachChild(child: CUIWindow): void;

Detach a child window.

Parameters ​

ParameterTypeDescription
childCUIWindowChild window.

Returns ​

void

Remarks ​

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

Inherited from ​

CUIWindow.DetachChild


Enable() ​

ts
Enable(is_enabled: boolean): void;

Enable or disable interaction.

Parameters ​

ParameterTypeDescription
is_enabledbooleanWhether the window should be enabled.

Returns ​

void

Remarks ​

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

Inherited from ​

CUIWindow.Enable


EnableScrollBar() ​

ts
EnableScrollBar(enable: boolean): void;

Enable or disable scrollbar.

Parameters ​

ParameterTypeDescription
enablebooleanWhether scrollbar should be enabled.

Returns ​

void


FocusReceiveTime() ​

ts
FocusReceiveTime(): number;

Returns ​

number

Level time when this window received focus.

Inherited from ​

CUIWindow.FocusReceiveTime


GetAbsoluteRect() ​

ts
GetAbsoluteRect(): Frect;

Returns ​

Frect

Window rectangle in screen coordinates.

Inherited from ​

CUIWindow.GetAbsoluteRect


GetFocusedItem() ​

ts
GetFocusedItem(): number;

Returns ​

number

Focused item index.


GetFont() ​

ts
GetFont(): CGameFont;

Get the font assigned to this window.

Returns ​

CGameFont

Font assigned to this window.

Remarks ​

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

Inherited from ​

CUIWindow.GetFont


GetHeight() ​

ts
GetHeight(): number;

Returns ​

number

Window height.

Inherited from ​

CUIWindow.GetHeight


GetItem() ​

ts
GetItem(index: number): CUIListItem;

Get an item by index.

Parameters ​

ParameterTypeDescription
indexnumberItem index.

Returns ​

CUIListItem

List item.


GetItemPos() ​

ts
GetItemPos(item: CUIListItem): number;

Get item index.

Parameters ​

ParameterTypeDescription
itemCUIListItemList item.

Returns ​

number

Item index.


GetMouseX() ​

ts
GetMouseX(): number;

Get cursor X coordinate stored on this window.

Returns ​

number

Current cursor X coordinate.

Since ​

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

Source ​

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

Inherited from ​

CUIWindow.GetMouseX


GetMouseY() ​

ts
GetMouseY(): number;

Get cursor Y coordinate stored on this window.

Returns ​

number

Current cursor Y coordinate.

Since ​

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

Source ​

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

Inherited from ​

CUIWindow.GetMouseY


GetSelectedItem() ​

ts
GetSelectedItem(): number;

Returns ​

number

Selected item index.


GetSize() ​

ts
GetSize(): number;

Returns ​

number

Number of items.


GetVertFlip() ​

ts
GetVertFlip(): boolean;

Returns ​

boolean

Whether vertical flip is enabled.


GetWidth() ​

ts
GetWidth(): number;

Returns ​

number

Window width.

Inherited from ​

CUIWindow.GetWidth


GetWndPos() ​

ts
GetWndPos(): vector2;

Returns ​

vector2

Window position relative to its parent.

Inherited from ​

CUIWindow.GetWndPos


Init() ​

Call Signature ​

ts
Init(frect: Frect): void;

Initialize window rectangle.

Parameters ​
ParameterTypeDescription
frectFrectWindow rectangle.
Returns ​

void

Inherited from ​

CUIWindow.Init

Call Signature ​

ts
Init(
   x1: number, 
   y1: number, 
   x2: number, 
   y2: number): void;

Initialize window rectangle.

Parameters ​
ParameterTypeDescription
x1numberX position.
y1numberY position.
x2numberWidth.
y2numberHeight.
Returns ​

void

Remarks ​

Coordinates are relative to the parent; x2 and y2 are size, not bottom-right coordinates.

Inherited from ​

CUIWindow.Init


IsAutoDelete() ​

ts
IsAutoDelete(): boolean;

Returns ​

boolean

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

Inherited from ​

CUIWindow.IsAutoDelete


IsCursorOverWindow() ​

ts
IsCursorOverWindow(): boolean;

Returns ​

boolean

Whether the UI cursor is currently over this window.

Inherited from ​

CUIWindow.IsCursorOverWindow


IsEnabled() ​

ts
IsEnabled(): boolean;

Returns ​

boolean

Whether the window accepts interaction.

Inherited from ​

CUIWindow.IsEnabled


IsListActive() ​

ts
IsListActive(): boolean;

Returns ​

boolean

Whether the list is active.


IsScrollBarEnabled() ​

ts
IsScrollBarEnabled(): boolean;

Returns ​

boolean

Whether scrollbar is enabled.


IsShown() ​

ts
IsShown(): boolean;

Returns ​

boolean

Whether the window is visible.

Inherited from ​

CUIWindow.IsShown


RemoveAll() ​

ts
RemoveAll(): void;

Remove all items.

Returns ​

void


RemoveItem() ​

ts
RemoveItem(index: number): void;

Remove an item by index.

Parameters ​

ParameterTypeDescription
indexnumberItem index.

Returns ​

void


ResetFocusCapture() ​

ts
ResetFocusCapture(): void;

Release focus capture.

Returns ​

void


ResetPPMode() ​

ts
ResetPPMode(): void;

Disable post-process mode for this window.

Returns ​

void

Remarks ​

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

Inherited from ​

CUIWindow.ResetPPMode


ScrollToBegin() ​

ts
ScrollToBegin(): void;

Scroll to the beginning.

Returns ​

void


ScrollToEnd() ​

ts
ScrollToEnd(): void;

Scroll to the end.

Returns ​

void


ScrollToPos() ​

ts
ScrollToPos(position: number): void;

Scroll to a list position.

Parameters ​

ParameterTypeDescription
positionnumberScroll position.

Returns ​

void


SetAutoDelete() ​

ts
SetAutoDelete(auto_delete: boolean): void;

Set whether the parent owns this child window.

Parameters ​

ParameterTypeDescription
auto_deletebooleanWhether the engine should delete the child automatically.

Returns ​

void

Remarks ​

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

Inherited from ​

CUIWindow.SetAutoDelete


SetFocusedItem() ​

ts
SetFocusedItem(index: number): void;

Set focused item index.

Parameters ​

ParameterTypeDescription
indexnumberItem index.

Returns ​

void


SetFont() ​

ts
SetFont(font: CGameFont): void;

Set the font used by this window.

Parameters ​

ParameterTypeDescription
fontCGameFontFont object.

Returns ​

void

Inherited from ​

CUIWindow.SetFont


SetHeight() ​

ts
SetHeight(height: number): void;

Set window height.

Parameters ​

ParameterTypeDescription
heightnumberNew height.

Returns ​

void

Inherited from ​

CUIWindow.SetHeight


SetItemHeight() ​

ts
SetItemHeight(height: number): void;

Set list item height.

Parameters ​

ParameterTypeDescription
heightnumberItem height.

Returns ​

void


SetPPMode() ​

ts
SetPPMode(): void;

Enable post-process mode for this window.

Returns ​

void

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.

Inherited from ​

CUIWindow.SetPPMode


SetTextColor() ​

ts
SetTextColor(color: number): void;

Set text color for list items.

Parameters ​

ParameterTypeDescription
colornumberARGB color.

Returns ​

void


SetVertFlip() ​

ts
SetVertFlip(flip: boolean): void;

Flip list direction vertically.

Parameters ​

ParameterTypeDescription
flipbooleanWhether vertical flip is enabled.

Returns ​

void


SetWidth() ​

ts
SetWidth(width: number): void;

Set window width.

Parameters ​

ParameterTypeDescription
widthnumberNew width.

Returns ​

void

Inherited from ​

CUIWindow.SetWidth


SetWindowName() ​

ts
SetWindowName(name: string): void;

Set debug/window name.

Parameters ​

ParameterTypeDescription
namestringWindow name.

Returns ​

void

Inherited from ​

CUIWindow.SetWindowName


SetWndPos() ​

Call Signature ​

ts
SetWndPos(vector2: vector2): void;

Set window position.

Parameters ​
ParameterTypeDescription
vector2vector2New position.
Returns ​

void

Inherited from ​

CUIWindow.SetWndPos

Call Signature ​

ts
SetWndPos(x1: number, y1: number): void;

Set window position.

Parameters ​
ParameterTypeDescription
x1numberX position.
y1numberY position.
Returns ​

void

Inherited from ​

CUIWindow.SetWndPos


SetWndRect() ​

Call Signature ​

ts
SetWndRect(rect: Frect): void;

Set window rectangle.

Parameters ​
ParameterTypeDescription
rectFrectNew rectangle.
Returns ​

void

Inherited from ​

CUIWindow.SetWndRect

Call Signature ​

ts
SetWndRect(
   x1: number, 
   y1: number, 
   x2: number, 
   y2: number): void;

Set window rectangle.

Parameters ​
ParameterTypeDescription
x1numberX position.
y1numberY position.
x2numberWidth.
y2numberHeight.
Returns ​

void

Remarks ​

Coordinates are relative to the parent; x2 and y2 are size, not bottom-right coordinates.

Inherited from ​

CUIWindow.SetWndRect


SetWndSize() ​

Call Signature ​

ts
SetWndSize(vector2: vector2): void;

Set window size.

Parameters ​
ParameterTypeDescription
vector2vector2New size.
Returns ​

void

Inherited from ​

CUIWindow.SetWndSize

Call Signature ​

ts
SetWndSize(width: number, height: number): void;

Set window size.

Parameters ​
ParameterTypeDescription
widthnumberNew width.
heightnumberNew height.
Returns ​

void

Inherited from ​

CUIWindow.SetWndSize


Show() ​

ts
Show(show: boolean): void;

Show or hide the window.

Parameters ​

ParameterTypeDescription
showbooleanWhether the window should be visible.

Returns ​

void

Remarks ​

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

Inherited from ​

CUIWindow.Show


ShowSelectedItem() ​

ts
ShowSelectedItem(show: boolean): void;

Scroll the selected item into view.

Parameters ​

ParameterTypeDescription
showbooleanWhether selected item should be shown.

Returns ​

void


WindowName() ​

ts
WindowName(): string;

Returns ​

string

Window name.

Inherited from ​

CUIWindow.WindowName

Properties ​

__name ​

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from ​

CUIWindow.__name


__name ​

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from ​

CUIWindow.__name