Skip to content
Version 2.35.0
↓ Get the launcher

IEntityContextMenu.Register method (1 of 2)

Register a menu item. isVisible gates per-entity (null = always visible); onClick fires with the row’s entity. Dispose the return value to unregister.

public IDisposable Register(string label, Func<EntityId, bool>? isVisible, Action<EntityId> onClick)

IEntityContextMenu.Register method (2 of 2)

Section titled “IEntityContextMenu.Register method (2 of 2)”

Register a menu item with an icon (framework 2.33.0): as the three-argument overload, plus iconPng = PNG bytes of a flat white glyph, surfaced as IconPng (null = no icon, same as the three-argument overload). The default body drops the icon, so an implementor compiled before 2.33.0 keeps loading; the framework’s own service overrides it.

public IDisposable Register(string label, Func<EntityId, bool>? isVisible,
Action<EntityId> onClick, byte[]? iconPng)