QML API reference

Your theme draws the interface. The Standard components handle common game behavior, such as browsing songs, starting play and opening results. Import RhythmGameQml to use them. For a first theme, follow the tutorial; use this reference to look up inputs, actions and customization options.

Choose a starting component

Add one of these components to the screen you are building:

ScreenComponentWhat your theme supplies
Main menuStandardMainControllerMenu buttons and artwork
Song selectionStandardSelectControllerStandardSelectListView delegates, or a custom wheel
DecideStandardDecideFlowChart or course details
GameplayStandardGameplayFlowLanes, notes, scores and other visuals
Chart or course resultStandardResultInputScore displays and Continue/Retry buttons
Multiplayer browserStandardMultiplayerFlowRoom list and room controls

Each includes the helpers it needs. For example, StandardGameplayFlow already includes StandardGameplayInput. Adding both would handle input twice. Each type page lists its included components.

Receive screen data

Declare the matching required property on your screen's root object:

ScreenRoot declaration
Decide or gameplayrequired property GameplayContext gameplay
Chart result, including a course stagerequired property ResultContext result
Course summaryrequired property CourseResultContext result
Settingsrequired property string initialSection

The game supplies these values when it creates a screen. Bind gameplay or result to the screen's Standard component. Do not construct or destroy the supplied contexts or scores yourself.

GameplayContext follows the current chart and players as a course advances. ResultContext keeps the completed chart's metadata and scores fixed. CourseResultContext describes the whole course. Read their type pages for player counts, missing data and lifetime rules.

Screen navigation explains globalRoot operations, settings section names, and opening charts or saved results.

For shared services, start with the Rg singleton. Rg.profileList.mainProfile supplies the active profile. During play or results, use each player's supplied profile instead. The Player reference describes live scores, columns, note models and timing.

Add a feature

These components can be added without replacing the screen's standard flow:

TaskComponent
Connect a song list to a controllerStandardSelectListView
Load saved replay events or gauge historyScoreDetails
Show an online rank or open its websiteStandardRanking
Convert saved note speed into drawing coordinatesStandardGameplayViewport
Show a score target or personal bestStandardGameplayTarget
Draw BGA and the miss layerStandardGameplayBga
Add Arena ready controls and chatStandardArenaSelectOverlay
Add Arena standings during playStandardArenaGameplayOverlay
Add Arena standings on resultsStandardArenaResultOverlay

Selection already supplies StandardRanking as its ranking property and StandardSelectPreview as preview. Customize those instances instead of creating duplicates. Arena overlays belong to the screen; the game does not add them automatically.

Change behavior

Start with properties and signals on the complete component. For example, StandardGameplayFlow::startReady and StandardGameplayFlow::finishReady let an animation delay play or results while the flow still saves scores.

Action callbacks have two common forms:

A request signal asks your theme to act; it does not report success. For example, StandardSelectController::moveRequested asks your wheel to move. Read each method's return-value description: accepting a request does not always mean a screen opened or a load succeeded.

Handle inactive screens

A screen may stay loaded while another screen is shown. The game disables inactive screens. Child Items, including the Standard components, inherit that state. Standard components stop their own input, timers and audio.

Your own Shortcut and Connections objects do not inherit an Item's enabled state. Bind their enabled properties to your screen where appropriate, and stop screen-owned audio and animations while inactive. Hiding an Item alone does not disable all of its behavior.

Build a custom flow

Use these smaller pieces when the complete component does not fit:

TaskStarting point
Menu actions without musicStandardMainActions
Standard browsing with custom controlsStandardSelectState
Custom folder loading and historyStandardSelectSession
Open selections with custom browsingStandardSelectActions
Navigation or bound selection keysStandardSelectNavigation or StandardSelectInput
Selection function keysStandardSelectShortcuts
Repeat entries for a circular wheelStandardSelectModelAdapter
Shared sort and replay labelsStandardSelectOptions
Preview audio or library reloadStandardSelectPreview or StandardSelectReload
Gameplay input without the standard flowStandardGameplayInput
Retry without an input gestureStandardChartRetry
Detect a scoring hitStandardGameplayAttemptState
Bound lane-key checksStandardInputKeys
Speed and cover inputStandardGameplaySpeedControls
Cancel a group of asynchronous requestsPendingReplyGroup

Replacing StandardGameplayFlow makes your theme responsible for startup, score saving, results and course progression. GameplayContext documents the operations for that case. Use the complete flow when you only need to change the screen's appearance.