Table of Contents

Class HotkeyComponent

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class HotkeyComponent : RichTextComponent
Inheritance
HotkeyComponent
Inherited Members
Extension Methods

Constructors

HotkeyComponent(ICoreClientAPI, string, CairoFont)

public HotkeyComponent(ICoreClientAPI api, string hotkeycode, CairoFont font)

Parameters

api ICoreClientAPI
hotkeycode string
font CairoFont

Methods

CalcBounds(TextFlowPath[], double, double, double, out double)

Initializes the size and stuff. Return true if you had to enter the next line

public override EnumCalcBoundsResult CalcBounds(TextFlowPath[] flowPath, double currentLineHeight, double offsetX, double lineY, out double nextOffsetX)

Parameters

flowPath TextFlowPath[]
currentLineHeight double
offsetX double
lineY double
nextOffsetX double

Returns

EnumCalcBoundsResult

True when longer than 1 line

ComposeElements(Context, ImageSurface)

Composes the element.

public override void ComposeElements(Context ctx, ImageSurface surfaceUnused)

Parameters

ctx Context

Context of the text component.

surfaceUnused ImageSurface

Dispose()

public override void Dispose()

DrawHotkey(ICoreClientAPI, string, double, double, Context, CairoFont, double, double, double, double, double, double[])

public static double DrawHotkey(ICoreClientAPI capi, string keycode, double x, double y, Context ctx, CairoFont font, double lineheight, double textHeight, double pluswdith, double symbolspacing, double leftRightPadding, double[] color)

Parameters

capi ICoreClientAPI
keycode string
x double
y double
ctx Context
font CairoFont
lineheight double
textHeight double
pluswdith double
symbolspacing double
leftRightPadding double
color double[]

Returns

double

GenHotkeyTexture()

public void GenHotkeyTexture()

RenderInteractiveElements(float, double, double, double)

Renders the text component.

public override void RenderInteractiveElements(float deltaTime, double renderX, double renderY, double renderZ)

Parameters

deltaTime float
renderX double
renderY double
renderZ double