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
ICoreClientAPIhotkeycode
stringfont
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
doubleoffsetX
doublelineY
doublenextOffsetX
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
ContextContext 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
ICoreClientAPIkeycode
stringx
doubley
doublectx
Contextfont
CairoFontlineheight
doubletextHeight
doublepluswdith
doublesymbolspacing
doubleleftRightPadding
doublecolor
double[]
Returns
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)