Skip to content

Class: MockCUIGameCustom ​

Mock game hud UI element.

Implements ​

  • CUIGameCustom

Constructors ​

Constructor ​

ts
new MockCUIGameCustom(): MockCUIGameCustom;

Returns ​

MockCUIGameCustom

Methods ​

create() ​

ts
static create(): MockCUIGameCustom;

Returns ​

MockCUIGameCustom


mock() ​

ts
static mock(): CUIGameCustom;

Returns ​

CUIGameCustom

Properties ​

AddCustomStatic ​

ts
AddCustomStatic: Mock<(id: string) => StaticDrawableWrapper>;

Add a custom HUD static by XML id.

Remarks ​

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

Param ​

id

Static descriptor id.

Param ​

singleInstance

Whether an existing static with the same id should be reused.

Returns ​

Drawable wrapper for the static.

Implementation of ​

ts
CUIGameCustom.AddCustomStatic

AddDialogToRender ​

ts
AddDialogToRender: Mock<() => null>;

Add a dialog window to the HUD render list.

Remarks ​

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

Param ​

window

Dialog window.

Implementation of ​

ts
CUIGameCustom.AddDialogToRender

CurrentItemAtCell ​

ts
CurrentItemAtCell: Mock<() => null>;

Get the inventory item currently under the actor menu cursor.

Since ​

OpenXRay 2015-07-07, 6e703b4c

Remarks ​

Requires the actor menu to have a current inventory cell.

Returns ​

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

Implementation of ​

ts
CUIGameCustom.CurrentItemAtCell

customStatic ​

ts
customStatic: Record<string, StaticDrawableWrapper> = {};

enable_fake_indicators ​

ts
enable_fake_indicators: Mock<() => void>;

Enable or disable fake HUD indicators.

Param ​

enabled

New fake-indicator state.

Implementation of ​

ts
CUIGameCustom.enable_fake_indicators

GetCustomStatic ​

ts
GetCustomStatic: Mock<(id: string) => StaticDrawableWrapper>;

Get an active custom HUD static by id.

Param ​

id

Static descriptor id.

Returns ​

Drawable wrapper, or null when missing.

Implementation of ​

ts
CUIGameCustom.GetCustomStatic

hide_messages ​

ts
hide_messages: Mock<() => void>;

Hide HUD messages.

Implementation of ​

ts
CUIGameCustom.hide_messages

HideActorMenu ​

ts
HideActorMenu: Mock<() => void>;

Hide the actor inventory menu.

Remarks ​

No-op when the actor menu is already hidden.

Implementation of ​

ts
CUIGameCustom.HideActorMenu

HidePdaMenu ​

ts
HidePdaMenu: Mock<() => void>;

Hide the PDA menu.

Remarks ​

No-op when the PDA menu is already hidden.

Implementation of ​

ts
CUIGameCustom.HidePdaMenu

RemoveCustomStatic ​

ts
RemoveCustomStatic: Mock<(id: string) => void>;

Remove a custom HUD static.

Remarks ​

Destroys the matching HUD-owned wrapper when it exists.

Param ​

id

Static descriptor id.

Implementation of ​

ts
CUIGameCustom.RemoveCustomStatic

RemoveDialogToRender ​

ts
RemoveDialogToRender: Mock<() => void>;

Remove a dialog window from the HUD render list.

Remarks ​

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

Param ​

window

Dialog window.

Implementation of ​

ts
CUIGameCustom.RemoveDialogToRender

show_messages ​

ts
show_messages: Mock<() => void>;

Show HUD messages.

Implementation of ​

ts
CUIGameCustom.show_messages

ShowActorMenu ​

ts
ShowActorMenu: Mock<() => boolean>;

Show the actor inventory menu.

Remarks ​

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

Returns ​

true after handling the toggle.

Implementation of ​

ts
CUIGameCustom.ShowActorMenu

update_fake_indicators ​

ts
update_fake_indicators: Mock<() => void>;

Update fake indicator visibility.

Param ​

indicator

Indicator id.

Param ​

enabled

New indicator state.

Implementation of ​

ts
CUIGameCustom.update_fake_indicators

UpdateActorMenu ​

ts
UpdateActorMenu: Mock<() => void>;

Refresh actor menu state.

Since ​

OpenXRay 2015-07-07, 6e703b4c

Remarks ​

Updates the actor menu only when it is currently shown.

Implementation of ​

ts
CUIGameCustom.UpdateActorMenu