Table of Contents

Class GuiElementNumberInput

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

A numerical input field for inputting numbers.

public class GuiElementNumberInput : GuiElementTextInput, IDisposable
Inheritance
GuiElementNumberInput
Implements
Inherited Members

Constructors

GuiElementNumberInput(ICoreClientAPI, ElementBounds, Action<string>, CairoFont)

Creates a numerical input field.

public GuiElementNumberInput(ICoreClientAPI capi, ElementBounds bounds, Action<string> OnTextChanged, CairoFont font)

Parameters

capi ICoreClientAPI

The Client API

bounds ElementBounds

The bounds of the GUI.

OnTextChanged Action<string>

The event fired when the number is changed.

font CairoFont

The font of the numbers.

Fields

Interval

public float Interval

Field Value

float

buttonHighlightTexture

public LoadedTexture buttonHighlightTexture

Field Value

LoadedTexture

Methods

ComposeTextElements(Context, ImageSurface)

public override void ComposeTextElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

GetValue()

Gets the current value of the number.

public float GetValue()

Returns

float

A float representing the value.

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.

OnMouseWheel(ICoreClientAPI, MouseWheelEventArgs)

The event fired when the mouse wheel is scrolled.

public override void OnMouseWheel(ICoreClientAPI api, MouseWheelEventArgs args)

Parameters

api ICoreClientAPI

The Client API

args MouseWheelEventArgs

The mouse wheel arguments.

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.