From Heavy Iron Modding
(Redirected from UI)

Base Type0x20
Games usedNight of 100 Frights
Battle for Bikini Bottom
Source codezUI.h

A UI is a graphic that is drawn to the screen, on top of everything else in the scene. It can accept user input and is used to display menus, UI elements, background images, boss health meters, logos, etc. It can draw either a simple 2D Texture or a 3D Model (but not both).


UIs are entity assets. Some notes on the 0x54 byte header:

  • The rotation and scale only apply to a UI with a model (ModelAssetID). A UI with a texture ignores these properties.
  • The position is measured in screen space. The XY coordinates are measured in pixels, (0,0) being the top left corner of the screen. The Z coordinate represents depth and is used to determine the draw order (a UI with a higher depth will be drawn behind one with a lower depth).
  • The asset ID at 0x10 is an optional Surface that is applied to the model.
  • The asset ID at 0x50 is an optional AnimList.

Following the header:

Offset Type Variable Description
0x54 int uiFlags Always 52.
0x58 struct (size: 4) dim
0x58 short Width in pixels.
0x5A short Height in pixels.
0x5C AssetID (Texture) Texture Texture for the UI. Note that you cannot show both a model and texture at the same time. If you set this to something other than null, ModelAssetID will be ignored.
0x60 Vector2 uva Texture Coordinate (Top Left)
0x68 Vector2 uvb Texture Coordinate (Top Right)
0x70 Vector2 uvc Texture Coordinate (Bottom Right)
0x78 Vector2 uvd Texture Coordinate (Bottom Left)
0x80 Event[numberOfEvents] Events


  • PadPressX
  • PadPressSquare
  • PadPressO
  • PadPressTriangle
  • PadPressL1
  • PadPressL2
  • PadPressR1
  • PadPressR2
  • PadPressStart
  • PadPressSelect
  • PadPressUp
  • PadPressDown
  • PadPressRight
  • PadPressLeft
  • UI Select
  • UI Unselect
  • UI Focus On
  • UI Focus Off
  • UI Focus On+Select
  • UI Focus Off+Unselect