Adds browsing, input, previews and music to a song selector. More...
| Import Statement: | import RhythmGameQml |
| Inherits: |
Use this component as the starting point for a selection screen. It loads folders and tables, opens charts and courses, and handles standard input. Your theme draws the list or wheel. See the selection lesson for a complete example.
For a normal list, use StandardSelectListView. Set its controller to this component, supply a delegate, and call its activate(index) method when a row is clicked. Set keyboard focus on the list and its enclosing focus scopes.
For a custom wheel, use entries for one row per item or presentationEntries for repeated rows. Handle moveRequested and focusRequested, then call setFocused with the selected row's data. Forward Up, Down, release and wheel events to handleUpPressed, handleDownPressed, handleReleased and handleWheel.
The root folder opens automatically. Set autoInitialize to false and call initialize when your view is ready if you need different timing.
Buttons can call the same actions as keys: openAutoplay, openReplay, cycleSortMode, openSettings and exit. Bind replay and autoplay buttons to replayAvailable and autoplayAvailable. StandardSelectInput lists the controller key mappings; StandardSelectShortcuts lists F2, F3, F11 and F12.
The controller already includes StandardSelectState, StandardSelectInput and StandardSelectShortcuts. Do not add a second copy beside it. Add StandardArenaSelectOverlay for Arena ready controls and chat.
Change preview, backgroundMusic or ranking to customize these features; set one to null to omit it. The preview follows the focused chart, and music stops while it plays. StandardSelectListView delays previews during movement; a custom wheel must bind preview.moving itself.
Set enterFeedbackSource and leaveFeedbackSource for folder sounds. To play your own feedback, set feedbackEnabled to false and handle enteredFolder and leftFolder.
Disabling the controller stops its input, shortcuts, audio and ranking work. To keep music playing while a popup is open, leave the controller enabled and set inputEnabled and shortcutsEnabled to false. Keep it outside any container you disable for that popup.
analogTicksPerStep : alias |
Number of analog scratch ticks required for one logical step.
backgroundMusic : AudioPlayer |
Looping selection music. Its source defaults to the active profile's bgmPath followed by "select". The player accepts a local file path. Playback stops while a preview plays or the controller is disabled.
Customize the player's source, volume or fadeInMillis. Set it to null to omit background music, or supply another AudioPlayer. A replacement owns its playback binding and must stop when the controller is disabled.
backgroundMusicDelayMillis : int |
Delay before background music starts or returns after a preview, in milliseconds.
enterFeedbackSource : url |
Entering-folder sound source. Use an empty URL to omit it.
exitEnabled : alias |
Controls the Escape shortcut for leaving selection.
feedbackEnabled : bool |
Controls folder sounds, independently of music.
initialRepeatDelayMillis : alias |
Delay before classic-scratch repeat begins, in milliseconds.
inputEnabled : bool |
Controls whether standard selection input is active.
leaveFeedbackSource : url |
Leaving-folder sound source. Use an empty URL to omit it.
minimumEntryCount : int |
Minimum number of entries produced by presentationEntries.
openInternetRankingAction : var |
Calls openInternetRankingAction() instead of opening the ranking website.
openInternetRankingShortcutEnabled : bool |
Controls whether the F11 Internet-ranking shortcut is active.
openSelectedFolderShortcutEnabled : bool |
Controls whether the F3 folder shortcut is active.
openSettingsShortcutEnabled : bool |
Controls whether the F12 settings shortcut is active.
presentationEntries : var |
Contains a copy of the entries, repeated to fill minimumEntryCount when needed. When entries is empty, contains null placeholders instead, with at least one row. The logical entries list stays empty.
preview : StandardSelectPreview |
Preview for the focused chart. Plays a discovered preview file or falls back to chart audio without BGA. Customize its delayMillis, moving, volume or chartAudioEnabled properties. Set it to null to omit previews, or supply another StandardSelectPreview with its own selection bindings.
ranking : StandardRanking |
Ranking for the focused chart. Uses the active profile and its chosen provider. Bind a display to its entries, position and loading properties. Customize its properties, or replace it with another StandardRanking. Set it to null to omit ranking support.
reloadShortcutEnabled : bool |
Controls whether the F2 reload shortcut is active.
repeatDelayMillis : alias |
Delay between repeated classic-scratch steps, in milliseconds.
shortcutsEnabled : bool |
Controls whether selection-specific F-key shortcuts are active.
moveRequested(int steps, bool repeated, bool analog) |
Requests that the theme move its current row by steps. The theme chooses whether movement wraps or stops at the end of the list. repeated identifies held input and analog identifies analog scratch or wheel input.
Note: The corresponding handler is onMoveRequested.
openSelectedFolderRequested() |
Emitted when F3 was not handled by the standard folder behavior.
Note: The corresponding handler is onOpenSelectedFolderRequested.
reloadRequested() |
Emitted when F2 was not handled by the standard reload behavior.
Note: The corresponding handler is onReloadRequested.
handleDownPressed(event) |
Handles a Down key event from the theme's visual focus item.
handleReleased(event) |
Handles a keyboard direction-release event from the theme.
handleUpPressed(event) |
Handles an Up key event from the theme's visual focus item.
handleWheel(event) |
Handles a wheel event from the theme's view. Returns true when accepted.
openInternetRanking() |
Opens the selected chart's ranking page, or calls the replacement action.
resetNavigation() |
Clears held directions, accumulated scratch and wheel movement, and repeat timing.