Class GuiElementVerticalTabs
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementVerticalTabs : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementVerticalTabs
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementVerticalTabs(ICoreClientAPI, GuiTab[], CairoFont, CairoFont, ElementBounds, Action<int, GuiTab>)
Creates a new vertical tab group.
public GuiElementVerticalTabs(ICoreClientAPI capi, GuiTab[] tabs, CairoFont font, CairoFont selectedFont, ElementBounds bounds, Action<int, GuiTab> onTabClicked)
Parameters
capiICoreClientAPIThe Client API
tabsGuiTab[]The collection of individual tabs.
fontCairoFontThe font for the group of them all.
selectedFontCairoFontboundsElementBoundsThe bounds of the tabs.
onTabClickedAction<int, GuiTab>The event fired when the tab is clicked.
Fields
ActiveElement
public int ActiveElement
Field Value
Right
public bool Right
Field Value
ToggleTabs
If true, more than one tab can be active
public bool ToggleTabs
Field Value
baseTexture
protected LoadedTexture baseTexture
Field Value
handler
protected Action<int, GuiTab> handler
Field Value
hoverTextures
protected LoadedTexture[] hoverTextures
Field Value
selectedFont
protected CairoFont selectedFont
Field Value
tabHeight
protected double tabHeight
Field Value
tabWidths
protected int[] tabWidths
Field Value
- int[]
tabs
protected GuiTab[] tabs
Field Value
- GuiTab[]
textOffsetY
protected double textOffsetY
Field Value
unscaledTabHeight
protected double unscaledTabHeight
Field Value
unscaledTabPadding
protected double unscaledTabPadding
Field Value
unscaledTabSpacing
protected double unscaledTabSpacing
Field Value
Properties
Focusable
Whether or not the element can be focused.
public override bool Focusable { get; }
Property Value
Methods
ComposeTextElements(Context, ImageSurface)
public override void ComposeTextElements(Context ctxStatic, ImageSurface surfaceStatic)
Parameters
ctxStaticContextsurfaceStaticImageSurface
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
OnKeyDown(ICoreClientAPI, KeyEvent)
The event fired when a key is held down.
public override void OnKeyDown(ICoreClientAPI api, KeyEvent args)
Parameters
apiICoreClientAPIThe client API
argsKeyEventThe key event arguments.
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.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTimefloatThe change in time.
SetValue(int)
Switches to a different tab.
public void SetValue(int index)
Parameters
indexintThe tab to switch to.
SetValue(int, bool)
Switches to a different tab.
public void SetValue(int index, bool triggerHandler)