Table of Contents

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

capi ICoreClientAPI

The Client API

tabs GuiTab[]

The collection of individual tabs.

font CairoFont

The font for the group of them all.

selectedFont CairoFont
bounds ElementBounds

The bounds of the tabs.

onTabClicked Action<int, GuiTab>

The event fired when the tab is clicked.

Fields

ActiveElement

public int ActiveElement

Field Value

int

Right

public bool Right

Field Value

bool

ToggleTabs

If true, more than one tab can be active

public bool ToggleTabs

Field Value

bool

baseTexture

protected LoadedTexture baseTexture

Field Value

LoadedTexture

handler

protected Action<int, GuiTab> handler

Field Value

Action<int, GuiTab>

hoverTextures

protected LoadedTexture[] hoverTextures

Field Value

LoadedTexture[]

selectedFont

protected CairoFont selectedFont

Field Value

CairoFont

tabHeight

protected double tabHeight

Field Value

double

tabWidths

protected int[] tabWidths

Field Value

int[]

tabs

protected GuiTab[] tabs

Field Value

GuiTab[]

textOffsetY

protected double textOffsetY

Field Value

double

unscaledTabHeight

protected double unscaledTabHeight

Field Value

double

unscaledTabPadding

protected double unscaledTabPadding

Field Value

double

unscaledTabSpacing

protected double unscaledTabSpacing

Field Value

double

Properties

Focusable

Whether or not the element can be focused.

public override bool Focusable { get; }

Property Value

bool

Methods

ComposeTextElements(Context, ImageSurface)

public override void ComposeTextElements(Context ctxStatic, ImageSurface surfaceStatic)

Parameters

ctxStatic Context
surfaceStatic ImageSurface

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

api ICoreClientAPI

The client API

args KeyEvent

The 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

api ICoreClientAPI

The Client API

args MouseEvent

The mouse event args.

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.

SetValue(int)

Switches to a different tab.

public void SetValue(int index)

Parameters

index int

The tab to switch to.

SetValue(int, bool)

Switches to a different tab.

public void SetValue(int index, bool triggerHandler)

Parameters

index int

The tab to switch to.

triggerHandler bool

Whether or not the handler triggers.