Class GuiElementHorizontalTabs
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementHorizontalTabs : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementHorizontalTabs
- Implements
- Inherited Members
- Extension Methods
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
ICoreClientAPIThe client API
tabs
GuiTab[]A collection of GUI tabs.
font
CairoFontThe font for the name of each tab.
selectedFont
CairoFontbounds
ElementBoundsThe bounds of each tab.
onTabClicked
Action<int>The event fired whenever the tab is clicked.
Fields
AlarmTabs
public bool AlarmTabs
Field Value
activeElement
public int activeElement
Field Value
unscaledTabPadding
public double unscaledTabPadding
Field Value
unscaledTabSpacing
public 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
ctxStatic
ContextsurfaceStatic
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
ICoreClientAPIThe client API
args
KeyEventThe 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
ICoreClientAPIThe Client API
args
MouseEventThe mouse event args.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTime
floatThe 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
WithAlarmTabs(CairoFont)
public void WithAlarmTabs(CairoFont notifyFont)
Parameters
notifyFont
CairoFont