Table of Contents

Class GuiElementItemstackInfo

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class GuiElementItemstackInfo : GuiElementTextBase, IDisposable
Inheritance
GuiElementItemstackInfo
Implements
Inherited Members

Constructors

GuiElementItemstackInfo(ICoreClientAPI, ElementBounds, InfoTextDelegate)

Creates an ItemStackInfo element.

public GuiElementItemstackInfo(ICoreClientAPI capi, ElementBounds bounds, InfoTextDelegate OnRequireInfoText)

Parameters

capi ICoreClientAPI

The client API

bounds ElementBounds

The bounds of the object.

OnRequireInfoText InfoTextDelegate

The function that is called when an item information is called.

Fields

BoxWidth

public static int BoxWidth

Field Value

int

Dirty

public bool Dirty

Field Value

bool

ItemStackSize

public static double ItemStackSize

Field Value

double

MarginTop

public static int MarginTop

Field Value

int

MinBoxHeight

public static int MinBoxHeight

Field Value

int

RecompCheckIgnoredStackAttributes

public string[] RecompCheckIgnoredStackAttributes

Field Value

string[]

Render

public bool Render

Field Value

bool

curSlot

public ItemSlot curSlot

Field Value

ItemSlot

descriptionElement

public GuiElementRichtext descriptionElement

Field Value

GuiElementRichtext

onRenderStack

public Action onRenderStack

Field Value

Action

texture

public LoadedTexture texture

Field Value

LoadedTexture

titleElement

public GuiElementRichtext titleElement

Field Value

GuiElementRichtext

Methods

AsyncRecompose()

public void AsyncRecompose()

ComposeElements(Context, ImageSurface)

Composes the elements.

public override void ComposeElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

The 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

ItemSlot

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.

SetSourceSlot(ItemSlot, bool)

Sets the source slot for stacks.

public bool SetSourceSlot(ItemSlot nowSlot, bool forceRecompose = false)

Parameters

nowSlot ItemSlot
forceRecompose bool

Returns

bool

True if recomposed