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
ICoreClientAPIitemstackgroup
ItemStackallstacks
List<ItemStack>unscaleSize
doublefloatType
EnumFloatonStackClicked
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
ICoreClientAPIitemstacks
ItemStack[]unscaledSize
doublefloatType
EnumFloatonStackClicked
Action<ItemStack>
Fields
ExtraTooltipText
public string ExtraTooltipText
Field Value
Itemstacks
public ItemStack[] Itemstacks
Field Value
ShowTooltip
public bool ShowTooltip
Field Value
curItemIndex
protected int curItemIndex
Field Value
onStackClicked
protected Action<ItemStack> onStackClicked
Field Value
overrideCurrentItemStack
public StackDisplayDelegate overrideCurrentItemStack
Field Value
renderOffset
public Vec3f renderOffset
Field Value
renderSize
public float renderSize
Field Value
secondsVisible
protected float secondsVisible
Field Value
slot
protected ItemSlot slot
Field Value
Properties
Background
public bool Background { get; set; }
Property Value
ShowStackSize
public bool ShowStackSize { get; set; }
Property Value
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
ComposeElements(Context, ImageSurface)
Composes the element.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
ImageSurface
OnMouseDown(MouseEvent)
public override void OnMouseDown(MouseEvent args)
Parameters
args
MouseEvent
OnRequireInfoText(ItemSlot)
protected override string OnRequireInfoText(ItemSlot slot)
Parameters
slot
ItemSlot
Returns
RenderInteractiveElements(float, double, double, double)
Renders the text component.
public override void RenderInteractiveElements(float deltaTime, double renderX, double renderY, double renderZ)