Loads a chart's online ranking and opens its ranking website. More...
| Import Statement: | import RhythmGameQml |
Set chartData to the chart you want to display. The active profile supplies the account, server and provider by default. StandardSelectController already includes this component as ranking. For a result screen, create one per player and also set profile and score. Course summaries have no ranking; individual course stages do.
Check available, then bind your display to entries, position, playerCount and loading. Positions start at one; zero means the player has no entry. clearCounts supplies totals by clear type.
LR2IR entries include the profile's local best score because LR2IR cannot identify that profile's account. Saves and imports update the local data. On results, score submission refreshes the ranking. previousPosition compares the earlier best score against the current opponents.
Call open from a button. Set entriesEnabled to false if you only need the link; this avoids downloading the leaderboard. Tachi may still need a chart-ID lookup. opening reports that wait, and openFailed reports a failed lookup or browser open.
Changing the chart, provider or profile, or disabling the component, cancels a pending website request.
Override provider or url for this display, or openUrlAction to handle the link yourself. These overrides do not save a profile preference. To save the user's provider choice, set profile.vars.generalVars.rankingProvider.
available : bool |
Whether the current selection has a supported ranking provider.
bestClearTypeResult : var |
Best local clear score, including score when supplied.
bestPointsResult : var |
Best local points score, including score when supplied.
chartData : var |
Chart metadata, or null when a folder or course is selected.
clearCounts : var |
Map from clear-type strings to row counts. Use zero for a missing key.
entries : var |
Ranking rows, including the local best score for LR2IR. Each row has userId, userName, bestPoints and bestClearType fields. Empty when disabled, unsupported, or entriesEnabled is false.
entriesEnabled : bool |
Controls leaderboard loading. The open action remains available when false.
loading : bool |
Whether ranking data or the previous result position is being loaded.
md5 : string |
Chart hash used by the ranking. Empty for unsupported selections.
openUrlAction : var |
Calls openUrlAction(websiteUrl) instead of opening the browser. Return false on failure; any other return value counts as handled.
opening : bool |
Whether open is waiting for a website link.
playerCount : int |
Number of rows, including the local LR2IR entry when present.
position : int |
The profile's position, or zero if it has no entry.
previousPosition : int |
Position of the player's earlier best score among the current opponents. Zero means no earlier score is available. This is not a historical snapshot of all players' ranks.
profile : var |
Profile whose account, saved scores and server settings are used.
provider : int |
OnlineRankingModel.RhythmGame, OnlineRankingModel.Tachi or OnlineRankingModel.LR2IR. Follows the profile's choice unless overridden.
score : var |
Normal chart score being shown on a result screen, or null on selection.
tachiGameId : string |
Resolved Tachi game ID, such as bms-7k. Empty before it is known.
url : string |
Website link. Tachi's link is empty until its chart ID is resolved.
openFailed() |
Emitted when a requested website lookup or open operation fails.
Note: The corresponding handler is onOpenFailed.
open() |
Opens the ranking page. True means the request was accepted, possibly with a pending Tachi lookup. False means unavailable or not handled. Handle openFailed for a failed lookup or browser open.
refresh() |
Reloads ranking data for the current chart and profile.