Skip to content

CreateCustomUiElement

nyfrk edited this page Aug 22, 2020 · 1 revision

ISettlers4Api::CreateCustomUiElement method

This method will show an in-game rendered custom user interface. It can be used to create buttons or panels to extend the user interface of the game.

Syntax

S4CUSTOMUI ISettlers4Api::CreateCustomUiElement(
	LPCS4CUSTOMUIELEMENT lpParam
);

Parameters

lpParam

A pointer to a S4CustomUiElement structure that defines the behavior of the custom UI element.

Return value

The return value is a handle to the custom UI element. You can pass it to ISettlers4Api::DestroyCustomUiElement, ISettlers4Api::HideCustomUiElement or ISettlers4Api::ShowCustomUiElement.

The return value will be NULL if the UI element could not be created.

Remarks

This method does create and show the custom UI element in one step.

You must free its resources by passing the return value to ISettlers4Api::DestroyCustomUiElement If you do not need the custom UI element anymore.

Requirements

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

See also

ISettlers4Api

S4CustomUiElement

ISettlers4Api::DestroyCustomUiElement

ISettlers4Api::HideCustomUiElement

ISettlers4Api::ShowCustomUiElement

Clone this wiki locally