swiftlys2/docs/api/ai/
API Reference › Menu

IMenuKeymap

Interface
Namespace: SwiftlyS2.Shared.Menu · Assembly: SwiftlyS2.CS2.dll
public interface IMenuKeymap

The resolved set of actions and keys for one menu.

A keymap combines the inherited CoreScope traversal actions with the menu's own actions, then resolves each one through the registered keybind sources.

View source

Properties

Actions

Every action available in this menu, ordered by Order.

IReadOnlyList<MenuActionDescriptor> Actions { get; }

Methods

GetKey(MenuActionId)

Gets the key currently bound to an action.

MenuKey GetKey(MenuActionId id)
Parameters
Returns
The bound key, or None when the action is unknown or unbound.

TryResolve(MenuKey, out MenuActionId)

Finds the action bound to a key.

bool TryResolve(MenuKey key, out MenuActionId action)
Parameters
Returns
true when an action is bound to the key.

Actions declared in the menu's own scope take precedence over inherited core actions bound to the same key.