Class SlideshowItemstackTextComponent
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
Draws multiple itemstacks Open in GitHub
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
capiICoreClientAPIitemstackgroupItemStackallstacksList<ItemStack>unscaleSizedoublefloatTypeEnumFloatonStackClickedAction<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
capiICoreClientAPIitemstacksItemStack[]unscaledSizedoublefloatTypeEnumFloatonStackClickedAction<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
flowPathTextFlowPath[]currentLineHeightdoubleoffsetXdoublelineYdoublenextOffsetXdouble
Returns
ComposeElements(Context, ImageSurface)
Composes the element.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurface
OnMouseDown(MouseEvent)
public override void OnMouseDown(MouseEvent args)
Parameters
argsMouseEvent
OnRequireInfoText(ItemSlot)
protected override string OnRequireInfoText(ItemSlot slot)
Parameters
slotItemSlot
Returns
RenderInteractiveElements(float, double, double, double)
Renders the text component.
public override void RenderInteractiveElements(float deltaTime, double renderX, double renderY, double renderZ)