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
new CUIGameCustom(): CUIGameCustom;Returns
CUIGameCustom
Methods
AddCustomStatic()
Call Signature
AddCustomStatic(id: string, singleInstance: boolean): StaticDrawableWrapper;Add a custom HUD static by XML id.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Static descriptor id. |
singleInstance | boolean | Whether an existing static with the same id should be reused. |
Returns
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
AddCustomStatic(
id: string,
singleInstance: boolean,
lifetime: number): StaticDrawableWrapper;Add a custom HUD static by XML id and lifetime.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Static descriptor id. |
singleInstance | boolean | Whether an existing static with the same id should be reused. |
lifetime | number | Time before the static is removed. |
Returns
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()
AddDialogToRender(window: CUIWindow): void;Add a dialog window to the HUD render list.
Parameters
| Parameter | Type | Description |
|---|---|---|
window | CUIWindow | Dialog window. |
Returns
void
Remarks
Adds the window to the HUD dialog holder. It shows the window but does not take ownership of it.
CurrentItemAtCell()
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()
enable_fake_indicators(enabled: boolean): void;Enable or disable fake HUD indicators.
Parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | New fake-indicator state. |
Returns
void
GetCustomStatic()
GetCustomStatic(id: string): Nullable<StaticDrawableWrapper>;Get an active custom HUD static by id.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Static descriptor id. |
Returns
Nullable<StaticDrawableWrapper>
Drawable wrapper, or null when missing.
hide_messages()
hide_messages(): void;Hide HUD messages.
Returns
void
HideActorMenu()
HideActorMenu(): void;Hide the actor inventory menu.
Returns
void
Remarks
No-op when the actor menu is already hidden.
HidePdaMenu()
HidePdaMenu(): void;Hide the PDA menu.
Returns
void
Remarks
No-op when the PDA menu is already hidden.
RemoveCustomStatic()
RemoveCustomStatic(id: string): void;Remove a custom HUD static.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Static descriptor id. |
Returns
void
Remarks
Destroys the matching HUD-owned wrapper when it exists.
RemoveDialogToRender()
RemoveDialogToRender(window: CUIWindow): void;Remove a dialog window from the HUD render list.
Parameters
| Parameter | Type | Description |
|---|---|---|
window | CUIWindow | Dialog window. |
Returns
void
Remarks
Hides and disables the window in the HUD dialog holder. It does not destroy the window.
show_messages()
show_messages(): void;Show HUD messages.
Returns
void
ShowActorMenu()
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
update_fake_indicators(indicator: number, enabled: boolean): void;Update fake indicator visibility.
Parameters
| Parameter | Type | Description |
|---|---|---|
indicator | number | Indicator id. |
enabled | boolean | New indicator state. |
Returns
void
Call Signature
update_fake_indicators(indicator: number, value: number): void;Update fake indicator value.
Parameters
| Parameter | Type | Description |
|---|---|---|
indicator | number | Indicator id. |
value | number | New indicator value. |
Returns
void
UpdateActorMenu()
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.