Table of Contents

Class CharacterMenuEntries

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

The actions modules add to a character's context menu: "Add Friend" from Social, and so on.

public static class CharacterMenuEntries
Inheritance
CharacterMenuEntries
Inherited Members

Remarks

The same character can be reached three ways (in the world, in the guild roster, in the party roster), and an action such as befriending someone belongs in all three. The menus keep their own entries (Inspect, Message, the rank entries) and call AppendTo(List<(string label, Action callback)>, CharacterMenuTarget) where module entries go, so a removed module leaves no entry naming it. A module registers once, before the first scene loads ([RuntimeInitializeOnLoadMethod]), as with GameMenuEntries.

Properties

All

The entries in menu order.

public static IReadOnlyList<CharacterMenuEntries.Entry> All { get; }

Property Value

IReadOnlyList<CharacterMenuEntries.Entry>

Methods

AppendTo(List<(string label, Action callback)>, CharacterMenuTarget)

Adds every entry that applies to target to a menu being built.

public static void AppendTo(List<(string label, Action callback)> menu, CharacterMenuTarget target)

Parameters

menu List<(string label, Action callback)>
target CharacterMenuTarget

Register(string, string, int, Action<CharacterMenuTarget>, Func<CharacterMenuTarget, bool>)

Adds (or replaces, by id) an action.

public static void Register(string id, string label, int order, Action<CharacterMenuTarget> onClick, Func<CharacterMenuTarget, bool> applies = null)

Parameters

id string
label string
order int
onClick Action<CharacterMenuTarget>
applies Func<CharacterMenuTarget, bool>

Unregister(string)

Removes an action; false when there was none with that id.

public static bool Unregister(string id)

Parameters

id string

Returns

bool