Repository navigation
Conversation
Requires ppy/osu-resources#440. This PR adds components rendering both the full and compact variants of the badge displaying the user's division inside of ranked play. Also includes a proposed DTO for storing division metadata, which I hope will later be used when we get web to serve tier/division data to the client. I prefered doing this over implicitly assuming divisions start at 600, are spaced 100 ELO apart, etc. since the intention is to have this metadata served by web anyway.
smoogipoo
requested changes
Oct 7, 2026
| } | ||
|
|
||
| [JsonConverter(typeof(StringEnumConverter))] | ||
| public enum Tier |
Contributor
There was a problem hiding this comment.
Would not put these in the same file as RankedPlayDivision. Maybe RankedPlayTier/RankedPlayDivision so that they're distinct from RankingTier (if we even want this to be separate in the first place).
Contributor
Author
There was a problem hiding this comment.
I completely missed RankingTier existing, will use that for now. Also will split out the division enum to a separate file and rename the model to APIRankedPlayDivision or something like that (is there a reason some response models have the API prefix and some don't?).
minetoblend
reviewed
Oct 7, 2026
Comment on lines
+58
to
+84
| new Sprite | ||
| { | ||
| Size = division.Tier switch | ||
| { | ||
| Tier.Bronze => new Vector2(33), | ||
| Tier.Silver => new Vector2(34.5f), | ||
| _ => new Vector2(36), | ||
| }, | ||
| Position = division.Tier switch | ||
| { | ||
| Tier.Bronze => new Vector2(43.5f, 24.75f), | ||
| Tier.Silver => new Vector2(42.75f, 27), | ||
| Tier.Gold => new Vector2(42, 23.25f), | ||
| Tier.Platinum => new Vector2(42, 28.5f), | ||
| Tier.Rhodium => new Vector2(42, 30), | ||
| Tier.Radiant => new Vector2(42, 33), | ||
| Tier.Lustrous => new Vector2(42, 43.5f), | ||
| _ => throw new ArgumentOutOfRangeException() | ||
| }, | ||
| Texture = textures.Get($@"Online/RankedPlay/Tiers/Rulesets/{ruleset.ShortName}"), | ||
| }, | ||
| new Sprite | ||
| { | ||
| RelativeSizeAxes = Axes.Both, | ||
| Texture = textures.Get($@"Online/RankedPlay/Tiers/Stars/{division.Key}"), | ||
| FillMode = FillMode.Fit, | ||
| }, |
Contributor
There was a problem hiding this comment.
the shine layer will go above the stars but below the ruleset icon, so probably a good idea to swap the draw order these two
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires ppy/osu-resources#440.
This PR adds components rendering both the full and compact variants of the badge displaying the user's division inside of ranked play.
Also includes a proposed DTO for storing division metadata, which I hope will later be used when we get web to serve tier/division data to the client. I prefered doing this over implicitly assuming divisions start at 600, are spaced 100 ELO apart, etc. since the intention is to have this metadata served by web anyway.
Regular badges:
Compact badges: