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
ICoreClientAPIThe Client API
items
List<ConfigItem>The list of items in the configuration.
OnItemClick
ConfigItemClickDelegateThe event fired when the particular item is clicked.
font
CairoFontThe font of the text.
bounds
ElementBoundsthe bounds of the element.
Fields
errorFont
public CairoFont errorFont
Field Value
innerBounds
public ElementBounds innerBounds
Field Value
items
public List<ConfigItem> items
Field Value
leftWidthRel
public double leftWidthRel
Field Value
rightWidthRel
public double rightWidthRel
Field Value
stdFont
public CairoFont stdFont
Field Value
titleFont
public CairoFont titleFont
Field Value
unscaledPadding
public static double unscaledPadding
Field Value
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
Contextsurfaces
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
ICoreClientAPIThe Client API
args
MouseEventThe 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
floatThe change in time.