-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add combo colour override control to editor #31473
Conversation
Closes ppy#25608. Logic mostly matching stable. All operations are done on `ComboOffset` which still makes overridden combo colours weirdly relatively dependent on each other rather than them be an "absolute" choice, but alas... As per stable, two consecutive new combos can use the same colour only if they are separated by a break: https://github.com/peppy/osu-stable-reference/blob/52f3f75ed7efd7b9eb56e1e45c95bb91504337be/osu!/GameModes/Edit/Modes/EditorModeCompose.cs#L4564-L4571 This control is only available once the user has changed the combo colours from defaults; additionally, only a single new combo object must be selected for the colour selector to show up.
Is this a requirement due to how it works internally? It's a super rare case that a user hasn't changed from the defaults anyway, but just curious. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the single minor issue raised, this is so good. Both the code and the UI/UX are spot on. Surprised it was so simply implemented (although I guess there was a dependent fix to make that happen).
mainButtonContainer = new Container | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
AutoSizeAxes = Axes.Y, | ||
Padding = new MarginPadding { Right = 30 }, | ||
Child = new DrawableTernaryButton | ||
{ | ||
Current = Current, | ||
Description = "New combo", | ||
CreateIcon = () => new SpriteIcon { Icon = OsuIcon.EditorNewComboA }, | ||
}, | ||
}, | ||
pickerButton = new ColourPickerButton | ||
{ | ||
Anchor = Anchor.CentreRight, | ||
Origin = Anchor.CentreRight, | ||
Width = 25, | ||
ComboColours = { BindTarget = comboColours } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably change the default state to the one where the button is hidden, I think this is generally how we handle these cases:
diff --git a/osu.Game/Screens/Edit/Components/TernaryButtons/NewComboTernaryButton.cs b/osu.Game/Screens/Edit/Components/TernaryButtons/NewComboTernaryButton.cs
index 8c64480b43..1f95d5f239 100644
--- a/osu.Game/Screens/Edit/Components/TernaryButtons/NewComboTernaryButton.cs
+++ b/osu.Game/Screens/Edit/Components/TernaryButtons/NewComboTernaryButton.cs
@@ -54,7 +54,6 @@ private void load(EditorBeatmap editorBeatmap)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
- Padding = new MarginPadding { Right = 30 },
Child = new DrawableTernaryButton
{
Current = Current,
@@ -66,6 +65,7 @@ private void load(EditorBeatmap editorBeatmap)
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
+ Alpha = 0,
Width = 25,
ComboColours = { BindTarget = comboColours }
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied in 8ffd254 👍
This "combo index with offsets" stuff can only ever work for combo colour lookups on the beatmap skin, and the beatmap skin won't be present until the user actually changes combo colours. See also: #12683. |
Closes #25608.
2025-01-10.13-33-08.mp4
Logic mostly matching stable. All operations are done on
ComboOffset
which still makes overridden combo colours weirdly relatively dependent on each other rather than them be an "absolute" choice, but alas...As per stable, two consecutive new combos can use the same colour only if they are separated by a break.
This control is only available once the user has changed the combo colours from defaults; additionally, only a single new combo object must be selected for the colour selector to show up.