|Games used||Night of 100 Frights|
Battle for Bikini Bottom
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:
|0x58||struct (size: 4)||dim|
|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)|
- UI Select
- UI Unselect
- UI Focus On
- UI Focus Off
- UI Focus On+Select
- UI Focus Off+Unselect