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

S4UiCallbackProc callback function

An application-defined or library-defined callback function used with the ISettlers4Api::CreateCustomUiElement method. The library calls this function whenever the state of the custom ui control changes.

The LPS4UICALLBACK type defines a pointer to this callback function.

Syntax

HRESULT S4HCALL S4UiCallbackProc(
	LPCVOID lpUiElement, 
	S4_CUSTOM_UI_ENUM newstate
);

Parameters

lpUiElement

The handle to the custom ui control. You can pass it to ISettlers4Api::DestroyCustomUiElement, ISettlers4Api::HideCustomUiElement or ISettlers4Api::ShowCustomUiElement.

newstate

The newstate parameter is one of the following values.

Value Description
S4_CUSTOM_UI_UNSELECTED
0
The ui control is not selected.
S4_CUSTOM_UI_SELECTED
1
The ui control is selected.
S4_CUSTOM_UI_HOVERING
2
The cursor is hovering over the unselected ui control.
S4_CUSTOM_UI_HOVERING_SELECTED
3
The cursor is hovering over the selected ui control.

Return value

The return value should be 0 (zero).

Remarks

none

Requirements

Minimum API Level 1
Target Edition Any
Header S4ModApi.h
Library S4ModApi.lib
DLL S4ModApi.dll

See also

ISettlers4Api

ISettlers4Api::CreateCustomUiElement

S4CustomUiElement

Clone this wiki locally