Skip to content

Class: CUIGameCustom ​

In-game UI root binding.

Source ​

C++ class CUIGameCustom

Custom Constructor ​

CUIGameCustom

Remarks ​

Current in-game HUD UI. Global helpers dereference the current game UI, so call them only while a level UI exists.

Constructors ​

Constructor ​

ts
new CUIGameCustom(): CUIGameCustom;

Returns ​

CUIGameCustom

Methods ​

AddCustomStatic() ​

Call Signature ​

ts
AddCustomStatic(id: string, singleInstance: boolean): StaticDrawableWrapper;

Add a custom HUD static by XML id.

Parameters ​
ParameterTypeDescription
idstringStatic descriptor id.
singleInstancebooleanWhether an existing static with the same id should be reused.
Returns ​

StaticDrawableWrapper

Drawable wrapper for the static.

Remarks ​

If singleInstance is true and an active static with this id already exists, that wrapper is returned.

Call Signature ​

ts
AddCustomStatic(
   id: string, 
   singleInstance: boolean, 
   lifetime: number): StaticDrawableWrapper;

Add a custom HUD static by XML id and lifetime.

Parameters ​
ParameterTypeDescription
idstringStatic descriptor id.
singleInstancebooleanWhether an existing static with the same id should be reused.
lifetimenumberTime before the static is removed.
Returns ​

StaticDrawableWrapper

Drawable wrapper for the static.

Remarks ​

The static is initialized from ui_custom_msgs.xml. Positive lifetime values remove it automatically after that many seconds unless the XML entry overrides ttl.


AddDialogToRender() ​

ts
AddDialogToRender(window: CUIWindow): void;

Add a dialog window to the HUD render list.

Parameters ​

ParameterTypeDescription
windowCUIWindowDialog window.

Returns ​

void

Remarks ​

Adds the window to the HUD dialog holder. It shows the window but does not take ownership of it.


CurrentItemAtCell() ​

ts
CurrentItemAtCell(): Nullable<game_object>;

Get the inventory item currently under the actor menu cursor.

Returns ​

Nullable<game_object>

Game object for the item, or null when the cell has no item.

Since ​

OpenXRay 2015-07-07, 6e703b4c

Remarks ​

Requires the actor menu to have a current inventory cell.


enable_fake_indicators() ​

ts
enable_fake_indicators(enabled: boolean): void;

Enable or disable fake HUD indicators.

Parameters ​

ParameterTypeDescription
enabledbooleanNew fake-indicator state.

Returns ​

void


GetCustomStatic() ​

ts
GetCustomStatic(id: string): Nullable<StaticDrawableWrapper>;

Get an active custom HUD static by id.

Parameters ​

ParameterTypeDescription
idstringStatic descriptor id.

Returns ​

Nullable<StaticDrawableWrapper>

Drawable wrapper, or null when missing.


hide_messages() ​

ts
hide_messages(): void;

Hide HUD messages.

Returns ​

void


HideActorMenu() ​

ts
HideActorMenu(): void;

Hide the actor inventory menu.

Returns ​

void

Remarks ​

No-op when the actor menu is already hidden.


HidePdaMenu() ​

ts
HidePdaMenu(): void;

Hide the PDA menu.

Returns ​

void

Remarks ​

No-op when the PDA menu is already hidden.


RemoveCustomStatic() ​

ts
RemoveCustomStatic(id: string): void;

Remove a custom HUD static.

Parameters ​

ParameterTypeDescription
idstringStatic descriptor id.

Returns ​

void

Remarks ​

Destroys the matching HUD-owned wrapper when it exists.


RemoveDialogToRender() ​

ts
RemoveDialogToRender(window: CUIWindow): void;

Remove a dialog window from the HUD render list.

Parameters ​

ParameterTypeDescription
windowCUIWindowDialog window.

Returns ​

void

Remarks ​

Hides and disables the window in the HUD dialog holder. It does not destroy the window.


show_messages() ​

ts
show_messages(): void;

Show HUD messages.

Returns ​

void


ShowActorMenu() ​

ts
ShowActorMenu(): boolean;

Show the actor inventory menu.

Returns ​

boolean

true after handling the toggle.

Remarks ​

Toggles the actor menu. If it is already shown, the call hides it instead.


update_fake_indicators() ​

Call Signature ​

ts
update_fake_indicators(indicator: number, enabled: boolean): void;

Update fake indicator visibility.

Parameters ​
ParameterTypeDescription
indicatornumberIndicator id.
enabledbooleanNew indicator state.
Returns ​

void

Call Signature ​

ts
update_fake_indicators(indicator: number, value: number): void;

Update fake indicator value.

Parameters ​
ParameterTypeDescription
indicatornumberIndicator id.
valuenumberNew indicator value.
Returns ​

void


UpdateActorMenu() ​

ts
UpdateActorMenu(): void;

Refresh actor menu state.

Returns ​

void

Since ​

OpenXRay 2015-07-07, 6e703b4c

Remarks ​

Updates the actor menu only when it is currently shown.