Class GuiElementSkillItemGrid
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
A slot for item skills. Open in GitHub
public class GuiElementSkillItemGrid : GuiElement, IDisposable
- Inheritance
-
GuiElementSkillItemGrid
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementSkillItemGrid(ICoreClientAPI, List<SkillItem>, int, int, Action<int>, ElementBounds)
Creates a Skill Item Grid.
public GuiElementSkillItemGrid(ICoreClientAPI capi, List<SkillItem> skillItems, int columns, int rows, Action<int> OnSlotClick, ElementBounds bounds)
Parameters
capiICoreClientAPIThe Client API
skillItemsList<SkillItem>The items with skills.
columnsintThe columns of the Item Grid
rowsintThe Rows of the Item Grid.
OnSlotClickAction<int>The event fired when the slot is clicked.
boundsElementBoundsThe bounds of the Item Grid.
Fields
OnSlotClick
public Action<int> OnSlotClick
Field Value
OnSlotOver
public Action<int> OnSlotOver
Field Value
selectedIndex
public int selectedIndex
Field Value
Properties
Focusable
Whether or not the element can be focused.
public override bool Focusable { get; }
Property Value
Methods
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurfaceThe surface of the GUI.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
OnMouseDownOnElement(ICoreClientAPI, MouseEvent)
The event fired when the mouse is pressed while on the element. Called after OnMouseDown and tells the engine that the event is handled.
public override void OnMouseDownOnElement(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API
argsMouseEventThe mouse event args.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTimefloatThe change in time.