struct MenuActionTable
Swift
struct MenuActionTable
Closures keyed by MenuID. Not Equatable — compared only by key set in tests.
UI construction and activation are main-thread (same as Button actions).
Sources/LavaMenu/Menu.swift:305
Constructors
init()
Creates an empty table.
Sources/LavaMenu/Menu.swift:309
Properties
var count: Int { get }
How many actions are registered.
Sources/LavaMenu/Menu.swift:314
var ids: Set<MenuID> { get }
The ids that have actions.
Sources/LavaMenu/Menu.swift:317
Methods
@discardableResult func activate(_ id: MenuID) -> Bool
Runs the action for id if present. Returns whether an action ran.
Sources/LavaMenu/Menu.swift:326
func contains(_ id: MenuID) -> Bool
Whether id has an action.
Sources/LavaMenu/Menu.swift:320