Skip to content

Class: CUIActorMenu

UI binding for CUIActorMenu.

Source

C++ class CUIActorMenu : CUIDialogWnd

Custom Constructor

CUIActorMenu

Remarks

The global actor menu is owned by the current game UI. Inventory moves require an active actor inventory context.

Extends

Constructors

Constructor

ts
new CUIActorMenu(): CUIActorMenu;

Create an actor menu dialog.

Returns

CUIActorMenu

Overrides

CUIDialogWnd.constructor

Methods

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

CUIDialogWnd.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

CUIDialogWnd.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

CUIDialogWnd.Enable


FocusReceiveTime()

ts
FocusReceiveTime(): number;

Returns

number

Level time when this window received focus.

Inherited from

CUIDialogWnd.FocusReceiveTime


get_drag_item()

ts
get_drag_item(): Nullable<game_object>;

Returns

Nullable<game_object>

Item currently being dragged, or null.


GetAbsoluteRect()

ts
GetAbsoluteRect(): Frect;

Returns

Frect

Window rectangle in screen coordinates.

Inherited from

CUIDialogWnd.GetAbsoluteRect


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

CUIDialogWnd.GetFont


GetHeight()

ts
GetHeight(): number;

Returns

number

Window height.

Inherited from

CUIDialogWnd.GetHeight


GetHolder()

ts
GetHolder(): CDialogHolder;

Get the dialog holder.

Returns

CDialogHolder

Dialog holder.

Remarks

The holder is available only after the dialog is assigned to one by the owning UI flow.

Inherited from

CUIDialogWnd.GetHolder


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

CUIDialogWnd.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

CUIDialogWnd.GetMouseY


GetWidth()

ts
GetWidth(): number;

Returns

number

Window width.

Inherited from

CUIDialogWnd.GetWidth


GetWndPos()

ts
GetWndPos(): vector2;

Returns

vector2

Window position relative to its parent.

Inherited from

CUIDialogWnd.GetWndPos


HideDialog()

ts
HideDialog(): void;

Hide the dialog.

Returns

void

Inherited from

CUIDialogWnd.HideDialog


highlight_for_each_in_slot()

ts
highlight_for_each_in_slot(
   functor: (object: game_object) => boolean, 
   type: TXR_EDDListType, 
   slot_id: number): void;

Highlight inventory cells that match a predicate in a slot list.

Parameters

ParameterTypeDescription
functor(object: game_object) => booleanPredicate called for each item.
typeTXR_EDDListTypeDrag-drop list type.
slot_idnumberSlot id.

Returns

void


highlight_section_in_slot()

ts
highlight_section_in_slot(
   section: string, 
   type: TXR_EDDListType, 
   slot_id: number): void;

Highlight inventory cells containing a section in a slot list.

Parameters

ParameterTypeDescription
sectionstringItem section name.
typeTXR_EDDListTypeDrag-drop list type.
slot_idnumberSlot id.

Returns

void


Init()

Call Signature

ts
Init(frect: Frect): void;

Initialize window rectangle.

Parameters
ParameterTypeDescription
frectFrectWindow rectangle.
Returns

void

Inherited from

CUIDialogWnd.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

CUIDialogWnd.Init


IsAutoDelete()

ts
IsAutoDelete(): boolean;

Returns

boolean

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

Inherited from

CUIDialogWnd.IsAutoDelete


IsCursorOverWindow()

ts
IsCursorOverWindow(): boolean;

Returns

boolean

Whether the UI cursor is currently over this window.

Inherited from

CUIDialogWnd.IsCursorOverWindow


IsEnabled()

ts
IsEnabled(): boolean;

Returns

boolean

Whether the window accepts interaction.

Inherited from

CUIDialogWnd.IsEnabled


IsShown()

ts
IsShown(): boolean;

Returns

boolean

Whether the window is visible.

Inherited from

CUIDialogWnd.IsShown


refresh_current_cell_item()

ts
refresh_current_cell_item(): void;

Refresh the currently focused inventory cell.

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

CUIDialogWnd.ResetPPMode


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

CUIDialogWnd.SetAutoDelete


SetFont()

ts
SetFont(font: CGameFont): void;

Set the font used by this window.

Parameters

ParameterTypeDescription
fontCGameFontFont object.

Returns

void

Inherited from

CUIDialogWnd.SetFont


SetHeight()

ts
SetHeight(height: number): void;

Set window height.

Parameters

ParameterTypeDescription
heightnumberNew height.

Returns

void

Inherited from

CUIDialogWnd.SetHeight


SetHolder()

ts
SetHolder(holder: CDialogHolder): void;

Assign a dialog holder.

Parameters

ParameterTypeDescription
holderCDialogHolderDialog holder.

Returns

void

Inherited from

CUIDialogWnd.SetHolder


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

CUIDialogWnd.SetPPMode


SetWidth()

ts
SetWidth(width: number): void;

Set window width.

Parameters

ParameterTypeDescription
widthnumberNew width.

Returns

void

Inherited from

CUIDialogWnd.SetWidth


SetWindowName()

ts
SetWindowName(name: string): void;

Set debug/window name.

Parameters

ParameterTypeDescription
namestringWindow name.

Returns

void

Inherited from

CUIDialogWnd.SetWindowName


SetWndPos()

Call Signature

ts
SetWndPos(vector2: vector2): void;

Set window position.

Parameters
ParameterTypeDescription
vector2vector2New position.
Returns

void

Inherited from

CUIDialogWnd.SetWndPos

Call Signature

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

Set window position.

Parameters
ParameterTypeDescription
x1numberX position.
y1numberY position.
Returns

void

Inherited from

CUIDialogWnd.SetWndPos


SetWndRect()

Call Signature

ts
SetWndRect(rect: Frect): void;

Set window rectangle.

Parameters
ParameterTypeDescription
rectFrectNew rectangle.
Returns

void

Inherited from

CUIDialogWnd.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

CUIDialogWnd.SetWndRect


SetWndSize()

Call Signature

ts
SetWndSize(vector2: vector2): void;

Set window size.

Parameters
ParameterTypeDescription
vector2vector2New size.
Returns

void

Inherited from

CUIDialogWnd.SetWndSize

Call Signature

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

Set window size.

Parameters
ParameterTypeDescription
widthnumberNew width.
heightnumberNew height.
Returns

void

Inherited from

CUIDialogWnd.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

CUIDialogWnd.Show


ShowDialog()

ts
ShowDialog(show: boolean): void;

Show or hide the dialog.

Parameters

ParameterTypeDescription
showbooleanWhether the dialog should be visible.

Returns

void

Inherited from

CUIDialogWnd.ShowDialog


ToBelt()

ts
ToBelt(object: game_object, use_cursor_position: boolean): boolean;

Move an object to the actor belt.

Parameters

ParameterTypeDescription
objectgame_objectItem object.
use_cursor_positionbooleanWhether to use the cursor position.

Returns

boolean

Whether the move succeeded.

Remarks

object must be an inventory item that belongs to the actor menu context.


ToSlot()

ts
ToSlot(
   object: game_object, 
   force_place: boolean, 
   slot_id: number): boolean;

Move an object to an actor slot.

Parameters

ParameterTypeDescription
objectgame_objectItem object.
force_placebooleanWhether to force placement.
slot_idnumberSlot id.

Returns

boolean

Whether the move succeeded.

Remarks

object must be an inventory item that belongs to the actor menu context.


WindowName()

ts
WindowName(): string;

Returns

string

Window name.

Inherited from

CUIDialogWnd.WindowName

Properties

__name

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from

CUIDialogWnd.__name


__name

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from

CUIDialogWnd.__name