Table of Contents

Class GuiElementHorizontalTabs

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class GuiElementHorizontalTabs : GuiElementTextBase, IDisposable
Inheritance
GuiElementHorizontalTabs
Implements
Inherited Members

Constructors

GuiElementHorizontalTabs(ICoreClientAPI, GuiTab[], CairoFont, CairoFont, ElementBounds, Action<int>)

Creates a collection of horizontal tabs.

public GuiElementHorizontalTabs(ICoreClientAPI capi, GuiTab[] tabs, CairoFont font, CairoFont selectedFont, ElementBounds bounds, Action<int> onTabClicked)

Parameters

capi ICoreClientAPI

The client API

tabs GuiTab[]

A collection of GUI tabs.

font CairoFont

The font for the name of each tab.

selectedFont CairoFont
bounds ElementBounds

The bounds of each tab.

onTabClicked Action<int>

The event fired whenever the tab is clicked.

Fields

AlarmTabs

public bool AlarmTabs

Field Value

bool

activeElement

public int activeElement

Field Value

int

unscaledTabPadding

public double unscaledTabPadding

Field Value

double

unscaledTabSpacing

public 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.

SetAlarmTab(int)

public void SetAlarmTab(int tabIndex)

Parameters

tabIndex int

SetValue(int, bool)

Sets the current tab to the given index.

public void SetValue(int selectedIndex, bool callhandler = true)

Parameters

selectedIndex int

The current index of the tab.

callhandler bool

WithAlarmTabs(CairoFont)

public void WithAlarmTabs(CairoFont notifyFont)

Parameters

notifyFont CairoFont