Skip to content

UI

getHeartRowLength(player): int

Defined in: packages/isaacscript-common/src/functions/ui.ts:10

Returns how many hearts are in the heart UI row. If the player has more than 6 hearts, this function will return 6.

EntityPlayer

int


getHeartsUIWidth(): int

Defined in: packages/isaacscript-common/src/functions/ui.ts:30

Helper function to get the width of the first player’s hearts on the UI. This is useful for drawing UI elements to the right of where the player’s hearts are. Make sure to use this in combination with the getHUDOffsetVector helper function.

int


getHUDOffsetVector(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:74

In the options menu, players have the ability to set a HUD offset (which gets written to the HudOffset attribute in the “options.ini” file). This function uses the current HUD offset to generate a vector that should be added to the corresponding position that you want to draw a UI element at.

For example:

  • If the user does not have a HUD offset configured, this function will return Vector(0, 0).
  • If the user has a HUD offset of 1.0 configured, this function will return Vector(20, 12).

Readonly<Vector>


getScreenBottomCenterPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:95

Readonly<Vector>


getScreenBottomLeftPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:100

Readonly<Vector>


getScreenBottomRightPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:105

Readonly<Vector>


getScreenBottomY(): float

Defined in: packages/isaacscript-common/src/functions/ui.ts:112

float


getScreenCenterPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:117

Readonly<Vector>


getScreenRightX(): float

Defined in: packages/isaacscript-common/src/functions/ui.ts:122

float


getScreenTopCenterPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:127

Readonly<Vector>


getScreenTopLeftPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:132

Readonly<Vector>


getScreenTopRightPos(): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/ui.ts:136

Readonly<Vector>


getVisibleHearts(player): int

Defined in: packages/isaacscript-common/src/functions/ui.ts:146

Get how many hearts are currently being shown on the hearts UI.

This function is originally from piber20 Helper.

EntityPlayer

int