Table of Contents

Class SlideshowItemstackTextComponent

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Draws multiple itemstacks

public class SlideshowItemstackTextComponent : ItemstackComponentBase
Inheritance
SlideshowItemstackTextComponent
Inherited Members
Extension Methods

Constructors

SlideshowItemstackTextComponent(ICoreClientAPI, ItemStack, List<ItemStack>, double, EnumFloat, Action<ItemStack>)

Looks at the collectibles handbook groupBy attribute and makes a list of itemstacks from that

public SlideshowItemstackTextComponent(ICoreClientAPI capi, ItemStack itemstackgroup, List<ItemStack> allstacks, double unscaleSize, EnumFloat floatType, Action<ItemStack> onStackClicked = null)

Parameters

capi ICoreClientAPI
itemstackgroup ItemStack
allstacks List<ItemStack>
unscaleSize double
floatType EnumFloat
onStackClicked Action<ItemStack>

SlideshowItemstackTextComponent(ICoreClientAPI, ItemStack[], double, EnumFloat, Action<ItemStack>)

Flips through given array of item stacks every second

public SlideshowItemstackTextComponent(ICoreClientAPI capi, ItemStack[] itemstacks, double unscaledSize, EnumFloat floatType, Action<ItemStack> onStackClicked = null)

Parameters

capi ICoreClientAPI
itemstacks ItemStack[]
unscaledSize double
floatType EnumFloat
onStackClicked Action<ItemStack>

Fields

ExtraTooltipText

public string ExtraTooltipText

Field Value

string

Itemstacks

public ItemStack[] Itemstacks

Field Value

ItemStack[]

ShowTooltip

public bool ShowTooltip

Field Value

bool

curItemIndex

protected int curItemIndex

Field Value

int

onStackClicked

protected Action<ItemStack> onStackClicked

Field Value

Action<ItemStack>

overrideCurrentItemStack

public StackDisplayDelegate overrideCurrentItemStack

Field Value

StackDisplayDelegate

renderOffset

public Vec3f renderOffset

Field Value

Vec3f

renderSize

public float renderSize

Field Value

float

secondsVisible

protected float secondsVisible

Field Value

float

slot

protected ItemSlot slot

Field Value

ItemSlot

Properties

Background

public bool Background { get; set; }

Property Value

bool

ShowStackSize

public bool ShowStackSize { get; set; }

Property Value

bool

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

A

ComposeElements(Context, ImageSurface)

Composes the element.

public override void ComposeElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

OnMouseDown(MouseEvent)

public override void OnMouseDown(MouseEvent args)

Parameters

args MouseEvent

OnRequireInfoText(ItemSlot)

protected override string OnRequireInfoText(ItemSlot slot)

Parameters

slot ItemSlot

Returns

string

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