Class GuiElementPassiveItemSlot
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
Displays a single slot from given inventory, cannot be directly interacted with. Currently used for the mouse slot Open in GitHub
public class GuiElementPassiveItemSlot : GuiElement, IDisposable
- Inheritance
-
GuiElementPassiveItemSlot
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementPassiveItemSlot(ICoreClientAPI, ElementBounds, IInventory, ItemSlot, bool)
Creates a new passive item slot.
public GuiElementPassiveItemSlot(ICoreClientAPI capi, ElementBounds bounds, IInventory inventory, ItemSlot slot, bool drawBackground = true)
Parameters
capiICoreClientAPIThe client API
boundsElementBoundsthe bounds of the Slot.
inventoryIInventorythe attached inventory for the slot.
slotItemSlotThe slot of the slot.
drawBackgroundboolDo we draw the background for this slot? (Default: true)
Fields
unscaledItemSize
public static double unscaledItemSize
Field Value
unscaledSlotSize
public static double unscaledSlotSize
Field Value
Methods
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurfaceThe surface of the GUI.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTimefloatThe change in time.