Table of Contents

Class GuiElementConfigList

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

A configurable list of items. An example of this is the controls in the settings menu.

public class GuiElementConfigList : GuiElementTextBase, IDisposable
Inheritance
GuiElementConfigList
Implements
Inherited Members
Extension Methods

Constructors

GuiElementConfigList(ICoreClientAPI, List<ConfigItem>, ConfigItemClickDelegate, CairoFont, ElementBounds)

Creates a new dropdown configuration list.

public GuiElementConfigList(ICoreClientAPI capi, List<ConfigItem> items, ConfigItemClickDelegate OnItemClick, CairoFont font, ElementBounds bounds)

Parameters

capi ICoreClientAPI

The Client API

items List<ConfigItem>

The list of items in the configuration.

OnItemClick ConfigItemClickDelegate

The event fired when the particular item is clicked.

font CairoFont

The font of the text.

bounds ElementBounds

the bounds of the element.

Fields

errorFont

public CairoFont errorFont

Field Value

CairoFont

innerBounds

public ElementBounds innerBounds

Field Value

ElementBounds

items

public List<ConfigItem> items

Field Value

List<ConfigItem>

leftWidthRel

public double leftWidthRel

Field Value

double

rightWidthRel

public double rightWidthRel

Field Value

double

stdFont

public CairoFont stdFont

Field Value

CairoFont

titleFont

public CairoFont titleFont

Field Value

CairoFont

unscaledPadding

public static double unscaledPadding

Field Value

double

Methods

Autoheight()

Automatically adjusts the height of the element.

public void Autoheight()

ComposeTextElements(Context, ImageSurface)

public override void ComposeTextElements(Context ctxs, ImageSurface surfaces)

Parameters

ctxs Context
surfaces ImageSurface

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

OnMouseDownOnElement(ICoreClientAPI, MouseEvent)

The event fired when the mouse is pressed while on the element. Called after OnMouseDown and tells the engine that the event is handled.

public override void OnMouseDownOnElement(ICoreClientAPI api, MouseEvent args)

Parameters

api ICoreClientAPI

The Client API

args MouseEvent

The mouse event args.

Refresh()

Refreshes the Config List.

public void Refresh()

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.