Class GuiElementItemstackInfo
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementItemstackInfo : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementItemstackInfo
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementItemstackInfo(ICoreClientAPI, ElementBounds, InfoTextDelegate)
Creates an ItemStackInfo element.
public GuiElementItemstackInfo(ICoreClientAPI capi, ElementBounds bounds, InfoTextDelegate OnRequireInfoText)
Parameters
capi
ICoreClientAPIThe client API
bounds
ElementBoundsThe bounds of the object.
OnRequireInfoText
InfoTextDelegateThe function that is called when an item information is called.
Fields
BoxWidth
public static int BoxWidth
Field Value
Dirty
public bool Dirty
Field Value
ItemStackSize
public static double ItemStackSize
Field Value
MarginTop
public static int MarginTop
Field Value
MinBoxHeight
public static int MinBoxHeight
Field Value
RecompCheckIgnoredStackAttributes
public string[] RecompCheckIgnoredStackAttributes
Field Value
- string[]
Render
public bool Render
Field Value
curSlot
public ItemSlot curSlot
Field Value
descriptionElement
public GuiElementRichtext descriptionElement
Field Value
onRenderStack
public Action onRenderStack
Field Value
texture
public LoadedTexture texture
Field Value
titleElement
public GuiElementRichtext titleElement
Field Value
Methods
AsyncRecompose()
public void AsyncRecompose()
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
ImageSurfaceThe surface of the GUI.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
GetSlot()
Gets the item slot for this stack info.
public ItemSlot GetSlot()
Returns
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTime
floatThe change in time.
SetSourceSlot(ItemSlot, bool)
Sets the source slot for stacks.
public bool SetSourceSlot(ItemSlot nowSlot, bool forceRecompose = false)
Parameters
Returns
- bool
True if recomposed