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
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
capi
ICoreClientAPIThe client API
bounds
ElementBoundsthe bounds of the Slot.
inventory
IInventorythe attached inventory for the slot.
slot
ItemSlotThe slot of the slot.
drawBackground
boolDo 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
ctx
Contextsurface
ImageSurfaceThe surface of the GUI.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTime
floatThe change in time.