Table of Contents

Class GuiElementSkillItemGrid

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

A slot for item skills.

public class GuiElementSkillItemGrid : GuiElement, IDisposable
Inheritance
GuiElementSkillItemGrid
Implements
Inherited Members

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 ICoreClientAPI

The Client API

skillItems List<SkillItem>

The items with skills.

columns int

The columns of the Item Grid

rows int

The Rows of the Item Grid.

OnSlotClick Action<int>

The event fired when the slot is clicked.

bounds ElementBounds

The bounds of the Item Grid.

Fields

OnSlotClick

public Action<int> OnSlotClick

Field Value

Action<int>

OnSlotOver

public Action<int> OnSlotOver

Field Value

Action<int>

selectedIndex

public int selectedIndex

Field Value

int

Properties

Focusable

Whether or not the element can be focused.

public override bool Focusable { get; }

Property Value

bool

Methods

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()

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 ICoreClientAPI

The Client API

args MouseEvent

The mouse event args.

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.