cocos_scaffold_ui_screen
Generate full-screen UI controllers for Cocos Creator games, including menu, settings, pause, and game-over screens that integrate with the GameLoop system.
Instructions
Generate Screen.ts — full-screen UI controller tied to GameLoop.
Kinds (all subscribe to the GameLoop singleton — scaffold that first so references resolve):
"menu" — title screen. @property startButton, shows when GameLoop.current == 'menu', click → go('play') + hide. "settings" — toggleable panel. @property closeButton + exposes .show() / .hide() / .toggle() for external callers. "pause" — overlay. Listens for Escape key via cc.input directly (doesn't require InputManager scaffolded). @property resumeButton. Toggles 'pause' ↔ 'play'. "game_over" — shown when GameLoop.current == 'over'. Reads GameScore.I.current + .high into @property scoreLabel / highLabel. @property restartButton → GameScore.reset() + GameLoop.go('play').
Every variant toggles @property rootNode.active for show/hide
(whole-subtree toggle beats per-node UIOpacity for full screens).
Default rel_path per kind: MenuScreen.ts / SettingsScreen.ts / PauseScreen.ts / GameOverScreen.ts.
Returns {path, rel_path, uuid_standard, uuid_compressed}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| kind | No | menu | |
| rel_path | No |