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. Open in GitHub
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
capiICoreClientAPIThe Client API
itemsList<ConfigItem>The list of items in the configuration.
OnItemClickConfigItemClickDelegateThe event fired when the particular item is clicked.
fontCairoFontThe font of the text.
boundsElementBoundsthe 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
ctxsContextsurfacesImageSurface
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
apiICoreClientAPIThe Client API
argsMouseEventThe 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
deltaTimefloatThe change in time.