UI Structures

uiColumn

Offset

Size

Type

Field

0x00

4

uiVariant*

width

0x04

4

uiItem*

items

0x08

4

uiColumn*

next


uiItem

Offset

Size

Type

Field

0x00

4

uiItemType

type

0x04

4

uiMenu*

menu

0x08

4

const char*

name

0x0C

4

int

instanceId

0x10

4

const char*

templateName

0x14

16

Marker

areaSrc

0x24

16

SDL_Rect

area

0x34

16

SDL_Rect

pad

0x44

4

int

enabled

0x48

4

int

ignoreEvents

0x4C

4

int

ha

0x50

4

int

va

0x54

4

uiVariant*

alpha

0x58

4

uiVariant*

fill

0x5C

4

int

useOverlayTint

0x60

12

int

overlayTint[3]

0x6C

40

uiItem::text

text

0x94

4

uiItem::uiTemplate

uiTemplate

0x98

28

uiItem::bam

bam

0xB4

24

uiItem::bmp

bmp

0xCC

56

uiItem::list

list

0x104

40

uiItem::scrollbar

scrollbar

0x12C

20

uiItem::slider

slider

0x140

28

uiItem::edit

edit

0x15C

8

uiItem::mosaic

mosaic

0x164

36

uiItem::movie

movie

0x188

44

uiItem::button

button

0x1B4

4

uiItem::map

map

0x1B8

12

uiItem::progressBar

progressBar

0x1C4

20

uiItem::slot

slot

0x1D8

8

uiItem::rectangle

rectangle

0x1E0

4

int

action

0x1E4

4

int

actionDbl

0x1E8

4

int

actionAlt

0x1EC

4

int

actionDrag

0x1F0

4

int

actionEnter

0x1F4

4

int

actionExit

0x1F8

4

int

actionUpdate

0x1FC

4

int

actionSimpleDrag

0x200

4

int

actionSimpleDrop

0x204

4

int

actionHold

0x208

4

int

actionScroll

0x20C

4

int

framesHeld

0x210

20

uiItem::tooltip

tooltip

0x224

4

uiVariant*

glow

0x228

4

uiVariant*

pulse

0x22C

4

uiItem*

next

Notes

enum uiItemType {
  ITEM_NONE = 0
  ITEM_TEXT = 1
  ITEM_BUTTON = 2
  ITEM_LIST = 3
  ITEM_EDIT = 4
  ITEM_MOVIE = 5
  ITEM_SLIDER = 6
  ITEM_HANDLE = 7
  ITEM_DRAGGABLE = 8
  ITEM_SLOT = 9
  ITEM_MAP = 10
  ITEM_TEMPLATE = 11
}

Note

UI elements defined and used in the UI.MENU file, use this data structure. Some of the field names are exposed via lua and the UI system and are available to retrieve and/or set the field value.

Note

The fields beginning with action are processed as events (when something occurs) and can be assigned to lua script actions to perform when the event happens. The lua scripts to assign to an action event are enclosed in double-quotes ". For example:

actionDbl "Infinity_OnPortraitDblClick(0)"

calls the lua Infinity_OnPortraitDblClick function when the mouse double clicks the portrait.


uiItem::bam

Offset

Size

Type

Field

0x00

4

uiVariant*

resref

0x04

4

uiVariant*

sequence

0x08

4

uiVariant*

sequenceonce

0x0C

4

uiVariant*

frame

0x10

4

uiVariant*

greyscale

0x14

4

uiVariant*

usealpha

0x18

4

int

scaletoclip


uiItem::bmp

Offset

Size

Type

Field

0x00

4

int

resname


uiItem::button

Offset

Size

Type

Field

0x00

4

uiVariant*

portrait

0x04

4

uiVariant*

paperdoll

0x08

4

int

encumbrance

0x0C

4

int

colorDisplay

0x10

4

int

frameTimes

0x14

4

const char*

toggle

0x18

4

const char*

on

0x1C

4

const char*

highlightGroup

0x20

4

uiVariant*

clickable

0x24

4

uiVariant*

actionBar

0x28

4

const char*

sound


uiItem::edit

Offset

Size

Type

Field

0x00

4

const char*

var

0x04

4

int

maxlines

0x08

4

int

maxchars

0x0C

4

uiVariant*

placeholder

0x10

4

int

cursor

0x14

4

int

selectStart

0x18

4

int

selectEnd


uiItem::list

Offset

Size

Type

Field

0x00

4

int

table

0x04

4

int

printrow

0x08

4

int

rowheight

0x0C

4

int

rowwidth

0x10

4

uiVariant*

rowbackground

0x14

4

int

dynamicHeight

0x18

4

uiColumn*

columns

0x1C

4

int

category

0x20

4

int

showHighlight

0x24

4

int

seperator

0x28

4

int

selected

0x2C

4

int

height

0x30

4

uiVariant*

color

0x34

4

int

currentRow


uiItem::map

Offset

Size

Type

Field

0x00

4

int

type


uiItem::mosaic

Offset

Size

Type

Field

0x00

4

uiVariant*

resref

0x04

4

int

respectClipping


uiItem::movie

Offset

Size

Type

Field

0x00

4

void*

res

0x04

16

SDL_Rect

subtitle

0x14

4

int

transparent

0x18

4

unsigned int

background

0x1C

4

int

loop

0x20

4

uiVariant*

queuedMovie


uiItem::progressBar

Offset

Size

Type

Field

0x00

4

uiVariant*

percent

0x04

4

uiVariant*

color

0x08

4

uiVariant*

fullColor


uiItem::rectangle

Offset

Size

Type

Field

0x00

4

int

number

0x04

4

uiVariant*

opacity


uiItem::scrollbar

Offset

Size

Type

Field

0x00

4

const char*

bam

0x04

4

const char*

function

0x08

4

uiVariant*

hide

0x0C

4

int

top

0x10

4

int

held

0x14

4

int

dragging

0x18

4

int

contentHeight

0x1C

4

int

respectConstraints

0x20

4

int

clunkyScroll

0x24

4

int

skipReset


uiItem::slider

Offset

Size

Type

Field

0x00

4

const char*

position

0x04

4

uiVariant*

settings

0x08

4

int

palette

0x0C

4

const char*

background

0x10

4

int

right


uiItem::slot

Offset

Size

Type

Field

0x00

4

uiVariant*

icon

0x04

4

uiVariant*

count

0x08

4

uiVariant*

usages

0x0C

4

uiVariant*

highlight

0x10

4

uiVariant*

tint


uiItem::text

Offset

Size

Type

Field

0x00

4

const char*

originalText

0x04

4

uiVariant*

text

0x08

4

const char*

font

0x0C

4

int

point

0x10

4

int

useFontZoom

0x14

4

uiVariant*

color

0x18

4

int

upper

0x1C

4

int

lower

0x20

4

uiVariant*

shadow

0x24

4

uiVariant*

showhighlight


uiItem::tooltip

Offset

Size

Type

Field

0x00

4

const char*

originalText

0x04

4

uiVariant*

text

0x08

4

uiVariant*

force

0x0C

4

int

position

0x10

4

int

forceTop


uiItem::uiTemplate

Offset

Size

Type

Field

0x00

4

uiItem*

item


uiMenu

Offset

Size

Type

Field

0x00

16

Marker

menuSrc

0x10

4

const char*

name

0x14

4

int

panel

0x18

4

int

state

0x1C

4

uiItem*

items

0x20

4

uiVariant*

modal

0x24

4

uiVariant*

opacity

0x28

4

uiVariant*

greyscale

0x2C

4

int

onOpen

0x30

4

int

onClose

0x34

4

SDL_Point

offset

0x3C

4

int

ha

0x40

4

int

va

0x44

4

int

width

0x48

4

int

height

0x4C

4

int

enabled

0x50

4

int

ignoreEsc


uiVariant

Offset

Size

Type

Field

0x00

4

uiVariantType

type

0x04

4

uiVariant::value

value

Notes

enum uiVariantType {
  UIVAR_INT = 0
  UIVAR_FUNCTION = 1
  UIVAR_STRING = 2
  UIVAR_FLOAT = 3
}

UI_ControlTableEntry_st

Offset

Size

Type

Field

0x00

4

unsigned long

nControlOffset

0x04

4

unsigned long

nControlSize


UI_Control_Button_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

8

unsigned char

refBam[8]

0x16

1

unsigned char

nSequence

0x17

1

unsigned char

bFlags

0x18

1

unsigned char

nFrameUp

0x19

1

unsigned char

refPtXLower

0x1A

1

unsigned char

nFrameDown

0x1B

1

unsigned char

refPtXHigher

0x1C

1

unsigned char

nFrameFocus

0x1D

1

unsigned char

refPtYLower

0x1E

1

unsigned char

nFrameDisabled

0x1F

1

unsigned char

refPtYHigher


UI_Control_Edit_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

8

unsigned char

refEdit[8]

0x16

8

unsigned char

refEditClientFocus[8]

0x1E

8

unsigned char

refEditClientNoFocus[8]

0x26

8

unsigned char

refEditCaret[8]

0x2E

2

unsigned short

nSequenceEditCaret

0x30

2

unsigned short

nFrameEditCaret

0x32

2

unsigned short

xEditClientOffset

0x34

2

unsigned short

yEditClientOffset

0x36

2

unsigned short

xEditCaretOffset

0x38

2

unsigned short

yEditCaretOffset

0x3A

8

unsigned char

refTextFont[8]

0x42

2

unsigned short

nSequenceText

0x44

32

unsigned char

defaultString[32]

0x64

2

unsigned short

maxChars

0x66

2

unsigned short

caseFormat

0x68

2

unsigned short

typeFormat


UI_Control_Label_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

4

unsigned long

textStrRef

0x12

8

unsigned char

refTextFont[8]

0x1A

4

unsigned long

rgbTextForeground

0x1E

4

unsigned long

rgbBackground

0x22

2

unsigned short

nLabelType


UI_Control_ScrollBar_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

8

unsigned char

refBam[8]

0x16

2

unsigned short

nSequence

0x18

2

unsigned short

nTopFrameUp

0x1A

2

unsigned short

nTopFrameDown

0x1C

2

unsigned short

nBottomFrameUp

0x1E

2

unsigned short

nBottomFrameDown

0x20

2

unsigned short

nBarFrame

0x22

2

unsigned short

nThumbFrame

0x24

4

unsigned long

nControlWindowId


UI_Control_Slider_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

8

unsigned char

refSlider[8]

0x16

8

unsigned char

refSliderThumb[8]

0x1E

2

unsigned short

nSequenceThumb

0x20

2

unsigned short

nFrameThumbNormal

0x22

2

unsigned short

nFrameThumbSelected

0x24

2

unsigned short

xThumbOffset

0x26

2

unsigned short

yThumbOffset

0x28

2

unsigned short

tickSize

0x2A

2

unsigned short

nTicks

0x2C

2

unsigned short

activeBarTop

0x2E

2

unsigned short

activeBarBottom

0x30

2

unsigned short

activeBarLeft

0x32

2

unsigned short

activeBarRight


UI_Control_TextDisplay_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

8

unsigned char

refTextFont[8]

0x16

8

unsigned char

refNameFont[8]

0x1E

4

unsigned long

rgbTextForeground

0x22

4

unsigned long

rgbDefaultName

0x26

4

unsigned long

rgbBackground

0x2A

4

unsigned long

nScrollBarId


UI_Control_st

Offset

Size

Type

Field

0x00

4

unsigned long

nID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType


UI_Header_st

Offset

Size

Type

Field

0x00

4

unsigned long

nFileType

0x04

4

unsigned long

nFileVersion

0x08

4

unsigned long

nPanels

0x0C

4

unsigned long

nOffsetToControlTable

0x10

4

unsigned long

nOffsetToPanelTable


UI_PanelHeader_st

Offset

Size

Type

Field

0x00

4

unsigned long

nPanelID

0x04

2

unsigned short

x

0x06

2

unsigned short

y

0x08

2

unsigned short

nWidth

0x0A

2

unsigned short

nHeight

0x0C

2

unsigned short

nType

0x0E

2

unsigned short

nControls

0x10

8

unsigned char

refMosaic[8]

0x18

2

unsigned short

nFirstControl

0x1A

2

unsigned short

wFlags