UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

38 lines 1.9 kB
/** * 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)`. */ export declare function getHUDOffsetVector(): Readonly<Vector>; /** * Returns how many hearts are in the heart UI row. If the player has more than 6 hearts, this * function will return 6. */ export declare function getHeartRowLength(player: EntityPlayer): int; /** * 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. */ export declare function getHeartsUIWidth(): int; export declare function getScreenBottomCenterPos(): Readonly<Vector>; export declare function getScreenBottomLeftPos(): Readonly<Vector>; export declare function getScreenBottomRightPos(): Readonly<Vector>; export declare function getScreenBottomY(): float; export declare function getScreenCenterPos(): Readonly<Vector>; export declare function getScreenRightX(): float; export declare function getScreenTopCenterPos(): Readonly<Vector>; export declare function getScreenTopLeftPos(): Readonly<Vector>; export declare function getScreenTopRightPos(): Readonly<Vector>; /** * Get how many hearts are currently being shown on the hearts UI. * * This function is originally from piber20 Helper. */ export declare function getVisibleHearts(player: EntityPlayer): int; //# sourceMappingURL=ui.d.ts.map