Skip to content
nyfrk edited this page Aug 22, 2020 · 1 revision

S4UiElement structure

The S4UiElement structure defines a ui element of the settlers 4.

The LPCS4UIELEMENT type defines a pointer to a const struct.

Syntax

typedef struct S4UiElement {
	WORD x, 
	WORD y, 
	WORD w,
	WORD h;
	WORD sprite;
	WORD id;
}  CONST * LPCS4UIELEMENT;

Members

x

Specifies the x-coordinate in the client area of the upper-left corner of the ui element.

y

Specifies the y-coordinate in the client area of the upper-left corner of the ui element.

w

Specifies the width of the ui element.

h

Specifies the height of the ui element.

sprite

Specifies the sprite id of the ui element. The sprite id in the gfx packages. See https://github.com/WizzardMaker/S4GFX for a list of all available sprites in a file group.

id

The id of the UI element. Each element has a unique id that can be used to identify elements.

Remarks

none

Requirements

Minimum API Level 1
Header S4ModApi.h

See also

ISettlers4Api

S4MouseProc

GetHoveringUiElement

Clone this wiki locally