Table of Contents

Class InventorySlotClaims

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

Windows that, while open, take a right-click on an inventory slot for themselves: the Commerce module's trade window puts the item on the table instead of equipping or using it.

public static class InventorySlotClaims
Inheritance
InventorySlotClaims
Inherited Members

Remarks

The inventory asks the claims first and falls back to its own meaning (equip, use) when none takes the click, so a game without the module keeps an ordinary bag. A claim answers true only when it handled the click. Registered once, before the first scene loads ([RuntimeInitializeOnLoadMethod]), as with CharacterMenuEntries.

Methods

Register(string, Func<int, bool>)

Adds (or replaces, by id) a claim on right-clicked inventory slots.

public static void Register(string id, Func<int, bool> tryClaimRightClick)

Parameters

id string
tryClaimRightClick Func<int, bool>

TryClaimRightClick(int)

True when an open window took the right-click on slotIndex.

public static bool TryClaimRightClick(int slotIndex)

Parameters

slotIndex int

Returns

bool

Unregister(string)

Removes a claim; false when there was none with that id.

public static bool Unregister(string id)

Parameters

id string

Returns

bool