Preskoči na vsebino

std-game-menu

Level: Atom | Entity: GameMenu | Persistence: runtime

1 states, 5 events, 5 transitions

Live Preview

schema.orb
{
"name": "GameMenuOrbital",
"orbitals": [
{
"name": "GameMenuOrbital",
"entity": {
"name": "GameMenu",
"persistence": "runtime",
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "status",
"type": "string",
"default": "active",
"values": [
"active",
"inactive",
"pending"
]
},
{
"name": "createdAt",
"type": "string"
}
]
},
"traits": [
{
"name": "GameMenuMenu",
"linkedEntity": "GameMenu",
"category": "interaction",
"stateMachine": {
"states": [
{
"name": "idle",
"isInitial": true
}
],
"events": [
{
"key": "INIT",
"name": "Initialize"
},
{
"key": "NAVIGATE",
"name": "Navigate"
},
{
"key": "START",
"name": "Start Game"
},
{
"key": "OPTIONS",
"name": "Options"
},
{
"key": "CREDITS",
"name": "Credits"
}
],
"transitions": [
{
"from": "idle",
"to": "idle",
"event": "INIT",
"effects": [
[
"render-ui",
"main",
{
"type": "game-menu",
"title": "GameMenu",
"subtitle": "Press Start",
"menuItems": [
{
"label": "Start Game",
"action": "START"
},
{
"label": "Options",
"action": "OPTIONS"
},
{
"label": "Credits",
"action": "CREDITS"
}
]
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "NAVIGATE",
"effects": []
},
{
"from": "idle",
"to": "idle",
"event": "START",
"effects": [
[
"render-ui",
"main",
{
"type": "game-menu",
"title": "GameMenu",
"subtitle": "Press Start",
"menuItems": [
{
"label": "Start Game",
"action": "START"
},
{
"label": "Options",
"action": "OPTIONS"
},
{
"label": "Credits",
"action": "CREDITS"
}
]
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "OPTIONS",
"effects": [
[
"render-ui",
"main",
{
"type": "game-menu",
"title": "GameMenu",
"subtitle": "Press Start",
"menuItems": [
{
"label": "Start Game",
"action": "START"
},
{
"label": "Options",
"action": "OPTIONS"
},
{
"label": "Credits",
"action": "CREDITS"
}
]
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "CREDITS",
"effects": [
[
"render-ui",
"main",
{
"type": "game-menu",
"title": "GameMenu",
"subtitle": "Press Start",
"menuItems": [
{
"label": "Start Game",
"action": "START"
},
{
"label": "Options",
"action": "OPTIONS"
},
{
"label": "Credits",
"action": "CREDITS"
}
]
}
]
]
}
]
}
}
],
"pages": [
{
"name": "GameMenuMenuPage",
"path": "/gamemenus",
"traits": [
{
"ref": "GameMenuMenu"
}
]
}
]
}
],
"description": "Game main menu atom using the `game-menu` pattern. Shows title, subtitle, and menu options (Start, Options, Credits, etc.)."
}
Loading preview...

Orbital Visualization

Loading visualization...

Entity Fields

FieldTypeDefault
idstring-
namestring-
descriptionstring-
statusstring"active"
createdAtstring-

States

StateType
idleInitial

Events

EventPayload
INIT-
NAVIGATE-
START-
OPTIONS-
CREDITS-

Transitions

FromEventToEffects
idleINITidle1 effect
idleNAVIGATEidle-
idleSTARTidle1 effect
idleOPTIONSidle1 effect
idleCREDITSidle1 effect