Class GuiElementSkillItemGrid
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
A slot for item skills.
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
capi
ICoreClientAPIThe Client API
skillItems
List<SkillItem>The items with skills.
columns
intThe columns of the Item Grid
rows
intThe Rows of the Item Grid.
OnSlotClick
Action<int>The event fired when the slot is clicked.
bounds
ElementBoundsThe 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
ctx
Contextsurface
ImageSurfaceThe 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
api
ICoreClientAPIThe Client API
args
MouseEventThe mouse event args.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTime
floatThe change in time.