The game supplies globalRoot to theme screens. Use its named operations to open or leave screens. The game manages the screen stack and object lifetime. Standard controllers call these operations for their usual actions.
| Operation | Effect |
|---|---|
globalRoot.openSelect() | Open song selection. |
globalRoot.openArenaBrowser() | Open the Multiplayer browser. |
globalRoot.openSettings(section = "") | Open Settings, optionally at a named section. |
globalRoot.returnToPreviousScreen() | Close the current screen and reveal the previous one. |
globalRoot.quitApplication() | Quit the game. |
The open operations return the screen, or a falsy value if it could not be created. globalRoot.currentScreen is the currently presented screen. Avoid reaching into the underlying stack or destroying screens yourself.
A settings screen receives initialSection. An empty string means its usual first page; "keys" requests input configuration. Map these names to your own layout and use the first page for unknown names. Calling openSettings() while Settings is current keeps its page; passing a nonempty section updates initialSection on that screen.
globalRoot.openChart(path, players) and globalRoot.openCourse(course, players) load play and open Decide. The players argument is optional and defaults to manual play with the main profile. Supply one entry for solo or double play, or two for local battle.
Each player entry has these fields:
| Field | Meaning |
|---|---|
profile | Required player profile. |
autoplay | Automatic play; defaults to false. |
replay | Play a saved recording; defaults to false. |
score | Full BmsScore or BmsScoreCourse; defaults to null. |
Replay requires a full score with recording data. Autoplay and replay cannot be combined. A score supplied without replay uses its saved note pattern for G-Battle. Prefer StandardSelectController::openReplay for the usual replay action: it chooses a saved run and loads the full score.
| Operation | Input |
|---|---|
globalRoot.openResult(result) | ResultContext from GameplayContext::finishStage(). |
globalRoot.openCourseResult(result) | CourseResultContext from GameplayContext::finishCourse(). |
globalRoot.openSavedResult(score, profile, chartData) | Full saved chart score and its owner and metadata. |
globalRoot.openSavedCourseResult(score, profile, course) | Full saved course score and its owner and course definition. |
StandardGameplayFlow opens completed results for you. For saved history, StandardSelectActions::openResult accepts a cached summary and loads the full score first. The two openSaved operations require the full score and copy the data needed by the new screen.
Custom flows can use globalRoot.openGameplay(gameplay) to open play above the current screen. Arena uses this to retain the screen underneath.
globalRoot.replaceGameplay(gameplay, previous) replaces the screen holding the previous GameplayContext and all screens above it. Omit previous to replace the current screen, as Decide does. This operation accepts local gameplay only. The replacement is created first, so a failed screen load leaves the existing screens available. Both operations return the new screen or null on failure.
The game owns local play for as long as its screens need it. Arena owns its own play objects. Themes must not destroy the supplied contexts or runners. Use StandardChartRetry for retry behavior and StandardGameplayFlow for normal course progression.