Skip to content

Make ModIcon skinnable#37552

Open
stanriders wants to merge 6 commits intoppy:masterfrom
stanriders:add-skinnable-mod-icons
Open

Make ModIcon skinnable#37552
stanriders wants to merge 6 commits intoppy:masterfrom
stanriders:add-skinnable-mod-icons

Conversation

@stanriders
Copy link
Copy Markdown
Member

This makes ModIcon support skin-based icons.

I've decided to enable it very conservatively for now, so currently only HUD ModDisplay and SkinnableModDisplay have skin-based icons enabled and everywhere else has them disabled. This can be changed pretty much at any point later for any mod icon if considered appropriate. Enabling it for every mod icon while replicates stable's behavior, looks quite silly on most screens.

Extended information is hidden for skin-based mod icons because extension background doesn't work with pretty much anything except the original icons. I've kept the cog though because I think its both important to always have an indicator for nonstandard settings, and it looks decent enough.

If this is considered for merging I'll also make an osu-resources PR with all the old default skins mod icons

Tests:
image
HUD:
image
SkinnableModDisplay:
image

Comment thread osu.Game/Rulesets/UI/ModIcon.cs Fixed
@peppy
Copy link
Copy Markdown
Member

peppy commented Apr 28, 2026

One point of concern is that anyone using legacy skins will be limited to the legacy mod icons with missing information, with no ability to toggle to the newer design even if they want to. I can see some users preferring the new ones.

@stanriders
Copy link
Copy Markdown
Member Author

I can add a toggle to the SkinnableModDisplay, but the default gameplay mod display is probably unsalvageble until its replaced by an actual skin element instead of being hardcoded into the HUD. User can just delete their legacy mod icons though and they'll get the new ones

@stanriders
Copy link
Copy Markdown
Member Author

I've added a toggle to the SkinnableModDisplay which also makes the extended information not showing up on legacy icons more obvious

2026-04-28.17-04-13.mp4

Comment on lines +27 to +31
[SettingSource(typeof(SkinnableModDisplayStrings), nameof(SkinnableModDisplayStrings.UseSkinIcons), nameof(SkinnableModDisplayStrings.UseSkinIconsDescription))]
public Bindable<bool> UseSkinIcons { get; } = new Bindable<bool>(true);

[SettingSource(typeof(SkinnableModDisplayStrings), nameof(SkinnableModDisplayStrings.ShowExtendedInformation), nameof(SkinnableModDisplayStrings.ShowExtendedInformationDescription))]
public Bindable<bool> ShowExtendedInformation { get; } = new Bindable<bool>(true);
public Bindable<bool> ShowExtendedInformation { get; } = new Bindable<bool>(false);
Copy link
Copy Markdown
Contributor

@diquoks diquoks Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe default settings should not have changed

Suggested change
[SettingSource(typeof(SkinnableModDisplayStrings), nameof(SkinnableModDisplayStrings.UseSkinIcons), nameof(SkinnableModDisplayStrings.UseSkinIconsDescription))]
public Bindable<bool> UseSkinIcons { get; } = new Bindable<bool>(true);
[SettingSource(typeof(SkinnableModDisplayStrings), nameof(SkinnableModDisplayStrings.ShowExtendedInformation), nameof(SkinnableModDisplayStrings.ShowExtendedInformationDescription))]
public Bindable<bool> ShowExtendedInformation { get; } = new Bindable<bool>(true);
public Bindable<bool> ShowExtendedInformation { get; } = new Bindable<bool>(false);
[SettingSource(typeof(SkinnableModDisplayStrings), nameof(SkinnableModDisplayStrings.UseSkinIcons), nameof(SkinnableModDisplayStrings.UseSkinIconsDescription))]
public Bindable<bool> UseSkinIcons { get; } = new Bindable<bool>();
[SettingSource(typeof(SkinnableModDisplayStrings), nameof(SkinnableModDisplayStrings.ShowExtendedInformation), nameof(SkinnableModDisplayStrings.ShowExtendedInformationDescription))]
public Bindable<bool> ShowExtendedInformation { get; } = new Bindable<bool>(true);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

because i don't think icons from skin should be by default prioritized over the default icons from lazer

it will look silly when the default behavior is mixing skin's icons and lazer's icons

};

protected ModDisplay CreateModsContainer() => new ModDisplay
protected ModDisplay CreateModsContainer() => new ModDisplay(useSkinIcons: true)
Copy link
Copy Markdown
Contributor

@diquoks diquoks Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also not sure about this...

maybe it's worth to do this and add a separate ModDisplay to default legacy skin's layout?

Suggested change
protected ModDisplay CreateModsContainer() => new ModDisplay(useSkinIcons: true)
protected ModDisplay CreateModsContainer() => new ModDisplay

One point of concern is that anyone using legacy skins will be limited to the legacy mod icons with missing information, with no ability to toggle to the newer design even if they want to.

it should also simplify the solution to the problem pointed out by peppy, since the user will not even need to add a new mod display element to his skin, but will only need to toggle one switch in the skin editor

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional, should be solved by replacing hardcoded ModDisplay with a SkinnableModDisplay in HUD, see

// This display is potentially a duplicate of users with a local ModDisplay in their skins.
// It would be very nice to remove this, but the version here has special logic with regards to replays
// and initial states, so needs a bit of thought before doing so.
ModDisplay = CreateModsContainer(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional, should be solved by replacing hardcoded ModDisplay with a SkinnableModDisplay in HUD, see

// This display is potentially a duplicate of users with a local ModDisplay in their skins.
// It would be very nice to remove this, but the version here has special logic with regards to replays
// and initial states, so needs a bit of thought before doing so.
ModDisplay = CreateModsContainer(),

i already saw that, i just don't think the current approach is a good one cuz users will be forced to use icons from skin without ability to change it or avoid duplicated ModDisplay
image

users will be forced to use icons from skin without ability to change it

i think the only method now would be to make a new switch for this in settings, but then the logic will become more confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants