EvilEngine/UIFT: Difference between revisions
Battlepedia>Seil (→Format) |
m (Seil moved page UIFT to EvilEngine/UIFT) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1:
<onlyinclude>
{{#vardefine:typeid|UIFT}}<nowiki/>
{{#vardefine:name|UI Font}}<nowiki/>
{{#vardefine:type|[[Entity]]}}<nowiki/>
{{#vardefine:basetype|0x21}}<nowiki/>
{{#vardefine:games|Scooby BFBB}}<nowiki/>
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zUIFont.h zUIFont.h]}}<nowiki/>
{{#vardefine:image|}}<nowiki/>
</onlyinclude>
{{AutoAssetInfobox}}
A '''UI Font''' is a text element that is drawn to the screen, on top of everything else in the scene. It can accept user input.
==Format==
UI Fonts are based on [[
* The rotation, scale, and color are all ignored. By default, the rotation is (0,0,0), scale is (1,1,1), and color is (1,1,1,1).
Line 8 ⟶ 19:
* The four asset IDs (0x0C, 0x10, 0x4C, 0x50) are always null. UI Fonts do not use models.
Following the placeable header and the UI data:
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x80 || short || '''uiFontFlags''' ||
▲| 0x54 || int || Unknown. All known possible values: 44, 48, 52, 54, 55, and 60.
|-
|
|-
|
|-
|
|-
|-
| 0x8C || [[Color]] || '''color''' ||
|-
|-
| 0x98 || short[2] || '''space''' ||
|-
|
|-
|
|-
▲| 0x88 || [[Color]] || '''Backdrop color'''.
|-
|
▲| 0x90 || short[8] || Unknown.
▲! colspan="3" | Events
|}
Line 69 ⟶ 75:
* UI Focus On+Select
* UI Focus Off+Unselect
{{Assets}}
{{AutoGameNavs}}
[[Category:Asset]]
|
Latest revision as of 22:59, 15 September 2022
A UI Font is a text element that is drawn to the screen, on top of everything else in the scene. It can accept user input.
UIFT | |
---|---|
UI Font | |
Type | Entity |
Base Type | 0x21 |
Games used | Night of 100 Frights Battle for Bikini Bottom |
Source code | zUIFont.h |
Format
UI Fonts are based on UI assets, which are based on entity assets. Some notes on the 0x54 byte header:
- The rotation, scale, and color are all ignored. By default, the rotation is (0,0,0), scale is (1,1,1), and color is (1,1,1,1).
- 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 Font with a higher depth will be drawn behind one with a lower depth).
- The four asset IDs (0x0C, 0x10, 0x4C, 0x50) are always null. UI Fonts do not use models.
Notes on the UI data:
- All known possible values for uiFlags: 44, 48, 52, 54, 55, and 60.
Following the placeable header and the UI data:
Offset | Type | Variable | Description |
---|---|---|---|
0x80 | short | uiFontFlags | |
0x82 | byte | mode | |
0x83 | byte | fontID | maybe the same as Font in game_object:text_box? |
0x84 | AssetID (Text) | textAssetID | |
0x88 | Color | bcolor | |
0x8C | Color | color | |
0x90 | short[4] | inset | |
0x98 | short[2] | space | |
0x9C | short[2] | cdim | |
0xA0 | int | max_height | |
Events | |||
0xA4 | Event[numberOfEvents] | Events |
Events
- PadPressX
- PadPressSquare
- PadPressO
- PadPressTriangle
- PadPressL1
- PadPressL2
- PadPressR1
- PadPressR2
- PadPressStart
- PadPressSelect
- PadPressUp
- PadPressDown
- PadPressRight
- PadPressLeft
- FontBackdropOn
- FontBackdropOff
- UI Select
- UI Unselect
- UI Focus On
- UI Focus Off
- UI Focus On+Select
- UI Focus Off+Unselect