Breadcrumb Chain
Three menus chained together with openMenu, each level having a back button to the previous one. Demonstrates how to build menu trees several levels deep without anything fancier than the basic openMenu action.
What it teaches
Section titled “What it teaches”- Building deeper menu trees with manual openMenu chains
- Per-level back buttons hard-coded to the parent
Manual vs context-aware back
Section titled “Manual vs context-aware back”Each level’s back button hard-codes the parent menu name:
{ slot: 0, name: "&eBack to Level 2", click { openMenu: "ame_chain_l2" } }Simple, predictable, works for tree structures where every menu has exactly one parent. Trade-off: if ame_chain_l2 is opened from multiple parents (say, both Level 1 AND a sub-hub), the back button always returns to Level 1, ignoring where the player actually came from.
For DAG-shaped menu graphs where a menu can be reached from multiple places and back should respect the actual arrival path, use openMenuCtx instead. It propagates context through the menu chain. See the activator/menu input docs for openMenuCtx mechanics.
For 95% of menus a simple tree is fine - hard-coded back buttons keep things predictable.
Try it
Section titled “Try it”- Drop the bundle into
plugins/AbstractMenus/menus/example/. /am reload.- Type
/ame_chainin-game. - Click “Go deeper” twice. Click back twice.