Class CharacterMenuEntries
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
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
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
idstringlabelstringorderintonClickAction<CharacterMenuTarget>appliesFunc<CharacterMenuTarget, bool>
Unregister(string)
Removes an action; false when there was none with that id.
public static bool Unregister(string id)
Parameters
idstring