1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Merge pull request #26167 from bdach/update-icons

Update toolbar, main menu, & editor icons
This commit is contained in:
Bartłomiej Dach 2023-12-27 21:22:14 +01:00 committed by GitHub
commit 28f5e90aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 475 additions and 246 deletions

View File

@ -17,6 +17,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Tools;
@ -54,7 +55,7 @@ namespace osu.Game.Rulesets.Osu.Edit
.Concat(DistanceSnapProvider.CreateTernaryButtons())
.Concat(new[]
{
new TernaryButton(rectangularGridSnapToggle, "Grid Snap", () => new SpriteIcon { Icon = FontAwesome.Solid.Th })
new TernaryButton(rectangularGridSnapToggle, "Grid Snap", () => new SpriteIcon { Icon = OsuIcon.EditorGridSnap })
});
private BindableList<HitObject> selectedHitObjects;

View File

@ -154,7 +154,7 @@ namespace osu.Game.Tests.Visual.UserInterface
public TestTitle()
{
Title = "title";
Icon = HexaconsIcons.Devtools;
Icon = OsuIcon.ChangelogB;
}
}
}

View File

@ -1,131 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Text;
namespace osu.Game.Graphics
{
public static class HexaconsIcons
{
public const string FONT_NAME = "Icons/Hexacons";
public static IconUsage BeatmapPacks => get(HexaconsMapping.beatmap_packs);
public static IconUsage Beatmap => get(HexaconsMapping.beatmap);
public static IconUsage Calendar => get(HexaconsMapping.calendar);
public static IconUsage Chart => get(HexaconsMapping.chart);
public static IconUsage Community => get(HexaconsMapping.community);
public static IconUsage Contests => get(HexaconsMapping.contests);
public static IconUsage Devtools => get(HexaconsMapping.devtools);
public static IconUsage Download => get(HexaconsMapping.download);
public static IconUsage Editor => get(HexaconsMapping.editor);
public static IconUsage FeaturedArtist => get(HexaconsMapping.featured_artist);
public static IconUsage Home => get(HexaconsMapping.home);
public static IconUsage Messaging => get(HexaconsMapping.messaging);
public static IconUsage Music => get(HexaconsMapping.music);
public static IconUsage News => get(HexaconsMapping.news);
public static IconUsage Notification => get(HexaconsMapping.notification);
public static IconUsage Profile => get(HexaconsMapping.profile);
public static IconUsage Rankings => get(HexaconsMapping.rankings);
public static IconUsage Search => get(HexaconsMapping.search);
public static IconUsage Settings => get(HexaconsMapping.settings);
public static IconUsage Social => get(HexaconsMapping.social);
public static IconUsage Store => get(HexaconsMapping.store);
public static IconUsage Tournament => get(HexaconsMapping.tournament);
public static IconUsage Wiki => get(HexaconsMapping.wiki);
private static IconUsage get(HexaconsMapping icon) => new IconUsage((char)icon, FONT_NAME);
// Basically just converting to something we can use in a `char` lookup for FontStore/GlyphStore compatibility.
// Names should match filenames in resources.
private enum HexaconsMapping
{
beatmap_packs,
beatmap,
calendar,
chart,
community,
contests,
devtools,
download,
editor,
featured_artist,
home,
messaging,
music,
news,
notification,
profile,
rankings,
search,
settings,
social,
store,
tournament,
wiki,
}
public class HexaconsStore : ITextureStore, ITexturedGlyphLookupStore
{
private readonly TextureStore textures;
public HexaconsStore(TextureStore textures)
{
this.textures = textures;
}
public void Dispose()
{
textures.Dispose();
}
public ITexturedCharacterGlyph? Get(string? fontName, char character)
{
if (fontName == FONT_NAME)
return new Glyph(textures.Get($"{fontName}/{((HexaconsMapping)character).ToString().Replace("_", "-")}"));
return null;
}
public Task<ITexturedCharacterGlyph?> GetAsync(string fontName, char character) => Task.Run(() => Get(fontName, character));
public Texture? Get(string name, WrapMode wrapModeS, WrapMode wrapModeT) => null;
public Texture Get(string name) => throw new NotImplementedException();
public Task<Texture> GetAsync(string name, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public Stream GetStream(string name) => throw new NotImplementedException();
public IEnumerable<string> GetAvailableResources() => throw new NotImplementedException();
public Task<Texture?> GetAsync(string name, WrapMode wrapModeS, WrapMode wrapModeT, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public class Glyph : ITexturedCharacterGlyph
{
public float XOffset => default;
public float YOffset => default;
public float XAdvance => default;
public float Baseline => default;
public char Character => default;
public float GetKerning<T>(T lastGlyph) where T : ICharacterGlyph => throw new NotImplementedException();
public Texture Texture { get; }
public float Width => Texture.Width;
public float Height => Texture.Height;
public Glyph(Texture texture)
{
Texture = texture;
}
}
}
}
}

View File

@ -1,96 +1,444 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using osu.Framework.Extensions;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Text;
namespace osu.Game.Graphics
{
public static class OsuIcon
{
public static IconUsage Get(int icon) => new IconUsage((char)icon, "osuFont");
#region Legacy spritesheet-based icons
private static IconUsage get(int icon) => new IconUsage((char)icon, @"osuFont");
// ruleset icons in circles
public static IconUsage RulesetOsu => Get(0xe000);
public static IconUsage RulesetMania => Get(0xe001);
public static IconUsage RulesetCatch => Get(0xe002);
public static IconUsage RulesetTaiko => Get(0xe003);
public static IconUsage RulesetOsu => get(0xe000);
public static IconUsage RulesetMania => get(0xe001);
public static IconUsage RulesetCatch => get(0xe002);
public static IconUsage RulesetTaiko => get(0xe003);
// ruleset icons without circles
public static IconUsage FilledCircle => Get(0xe004);
public static IconUsage CrossCircle => Get(0xe005);
public static IconUsage Logo => Get(0xe006);
public static IconUsage ChevronDownCircle => Get(0xe007);
public static IconUsage EditCircle => Get(0xe033);
public static IconUsage LeftCircle => Get(0xe034);
public static IconUsage RightCircle => Get(0xe035);
public static IconUsage Charts => Get(0xe036);
public static IconUsage Solo => Get(0xe037);
public static IconUsage Multi => Get(0xe038);
public static IconUsage Gear => Get(0xe039);
public static IconUsage FilledCircle => get(0xe004);
public static IconUsage Logo => get(0xe006);
public static IconUsage ChevronDownCircle => get(0xe007);
public static IconUsage EditCircle => get(0xe033);
public static IconUsage LeftCircle => get(0xe034);
public static IconUsage RightCircle => get(0xe035);
public static IconUsage Charts => get(0xe036);
public static IconUsage Solo => get(0xe037);
public static IconUsage Multi => get(0xe038);
public static IconUsage Gear => get(0xe039);
// misc icons
public static IconUsage Bat => Get(0xe008);
public static IconUsage Bubble => Get(0xe009);
public static IconUsage BubblePop => Get(0xe02e);
public static IconUsage Dice => Get(0xe011);
public static IconUsage Heart => Get(0xe02f);
public static IconUsage HeartBreak => Get(0xe030);
public static IconUsage Hot => Get(0xe031);
public static IconUsage ListSearch => Get(0xe032);
public static IconUsage Bat => get(0xe008);
public static IconUsage Bubble => get(0xe009);
public static IconUsage BubblePop => get(0xe02e);
public static IconUsage Dice => get(0xe011);
public static IconUsage HeartBreak => get(0xe030);
public static IconUsage Hot => get(0xe031);
public static IconUsage ListSearch => get(0xe032);
//osu! playstyles
public static IconUsage PlayStyleTablet => Get(0xe02a);
public static IconUsage PlayStyleMouse => Get(0xe029);
public static IconUsage PlayStyleKeyboard => Get(0xe02b);
public static IconUsage PlayStyleTouch => Get(0xe02c);
public static IconUsage PlayStyleTablet => get(0xe02a);
public static IconUsage PlayStyleMouse => get(0xe029);
public static IconUsage PlayStyleKeyboard => get(0xe02b);
public static IconUsage PlayStyleTouch => get(0xe02c);
// osu! difficulties
public static IconUsage EasyOsu => Get(0xe015);
public static IconUsage NormalOsu => Get(0xe016);
public static IconUsage HardOsu => Get(0xe017);
public static IconUsage InsaneOsu => Get(0xe018);
public static IconUsage ExpertOsu => Get(0xe019);
public static IconUsage EasyOsu => get(0xe015);
public static IconUsage NormalOsu => get(0xe016);
public static IconUsage HardOsu => get(0xe017);
public static IconUsage InsaneOsu => get(0xe018);
public static IconUsage ExpertOsu => get(0xe019);
// taiko difficulties
public static IconUsage EasyTaiko => Get(0xe01a);
public static IconUsage NormalTaiko => Get(0xe01b);
public static IconUsage HardTaiko => Get(0xe01c);
public static IconUsage InsaneTaiko => Get(0xe01d);
public static IconUsage ExpertTaiko => Get(0xe01e);
public static IconUsage EasyTaiko => get(0xe01a);
public static IconUsage NormalTaiko => get(0xe01b);
public static IconUsage HardTaiko => get(0xe01c);
public static IconUsage InsaneTaiko => get(0xe01d);
public static IconUsage ExpertTaiko => get(0xe01e);
// fruits difficulties
public static IconUsage EasyFruits => Get(0xe01f);
public static IconUsage NormalFruits => Get(0xe020);
public static IconUsage HardFruits => Get(0xe021);
public static IconUsage InsaneFruits => Get(0xe022);
public static IconUsage ExpertFruits => Get(0xe023);
public static IconUsage EasyFruits => get(0xe01f);
public static IconUsage NormalFruits => get(0xe020);
public static IconUsage HardFruits => get(0xe021);
public static IconUsage InsaneFruits => get(0xe022);
public static IconUsage ExpertFruits => get(0xe023);
// mania difficulties
public static IconUsage EasyMania => Get(0xe024);
public static IconUsage NormalMania => Get(0xe025);
public static IconUsage HardMania => Get(0xe026);
public static IconUsage InsaneMania => Get(0xe027);
public static IconUsage ExpertMania => Get(0xe028);
public static IconUsage EasyMania => get(0xe024);
public static IconUsage NormalMania => get(0xe025);
public static IconUsage HardMania => get(0xe026);
public static IconUsage InsaneMania => get(0xe027);
public static IconUsage ExpertMania => get(0xe028);
// mod icons
public static IconUsage ModPerfect => Get(0xe049);
public static IconUsage ModAutopilot => Get(0xe03a);
public static IconUsage ModAuto => Get(0xe03b);
public static IconUsage ModCinema => Get(0xe03c);
public static IconUsage ModDoubleTime => Get(0xe03d);
public static IconUsage ModEasy => Get(0xe03e);
public static IconUsage ModFlashlight => Get(0xe03f);
public static IconUsage ModHalftime => Get(0xe040);
public static IconUsage ModHardRock => Get(0xe041);
public static IconUsage ModHidden => Get(0xe042);
public static IconUsage ModNightcore => Get(0xe043);
public static IconUsage ModNoFail => Get(0xe044);
public static IconUsage ModRelax => Get(0xe045);
public static IconUsage ModSpunOut => Get(0xe046);
public static IconUsage ModSuddenDeath => Get(0xe047);
public static IconUsage ModTarget => Get(0xe048);
public static IconUsage ModPerfect => get(0xe049);
public static IconUsage ModAutopilot => get(0xe03a);
public static IconUsage ModAuto => get(0xe03b);
public static IconUsage ModCinema => get(0xe03c);
public static IconUsage ModDoubleTime => get(0xe03d);
public static IconUsage ModEasy => get(0xe03e);
public static IconUsage ModFlashlight => get(0xe03f);
public static IconUsage ModHalftime => get(0xe040);
public static IconUsage ModHardRock => get(0xe041);
public static IconUsage ModHidden => get(0xe042);
public static IconUsage ModNightcore => get(0xe043);
public static IconUsage ModNoFail => get(0xe044);
public static IconUsage ModRelax => get(0xe045);
public static IconUsage ModSpunOut => get(0xe046);
public static IconUsage ModSuddenDeath => get(0xe047);
public static IconUsage ModTarget => get(0xe048);
// Use "Icons/BeatmapDetails/mod-icon" instead
// public static IconUsage ModBg => Get(0xe04a);
#endregion
#region New single-file-based icons
public const string FONT_NAME = @"Icons";
public static IconUsage Audio => get(OsuIconMapping.Audio);
public static IconUsage Beatmap => get(OsuIconMapping.Beatmap);
public static IconUsage Calendar => get(OsuIconMapping.Calendar);
public static IconUsage ChangelogA => get(OsuIconMapping.ChangelogA);
public static IconUsage ChangelogB => get(OsuIconMapping.ChangelogB);
public static IconUsage Chat => get(OsuIconMapping.Chat);
public static IconUsage CheckCircle => get(OsuIconMapping.CheckCircle);
public static IconUsage CollapseA => get(OsuIconMapping.CollapseA);
public static IconUsage Collections => get(OsuIconMapping.Collections);
public static IconUsage Cross => get(OsuIconMapping.Cross);
public static IconUsage CrossCircle => get(OsuIconMapping.CrossCircle);
public static IconUsage Crown => get(OsuIconMapping.Crown);
public static IconUsage Debug => get(OsuIconMapping.Debug);
public static IconUsage Delete => get(OsuIconMapping.Delete);
public static IconUsage Details => get(OsuIconMapping.Details);
public static IconUsage Discord => get(OsuIconMapping.Discord);
public static IconUsage EllipsisHorizontal => get(OsuIconMapping.EllipsisHorizontal);
public static IconUsage EllipsisVertical => get(OsuIconMapping.EllipsisVertical);
public static IconUsage ExpandA => get(OsuIconMapping.ExpandA);
public static IconUsage ExpandB => get(OsuIconMapping.ExpandB);
public static IconUsage FeaturedArtist => get(OsuIconMapping.FeaturedArtist);
public static IconUsage FeaturedArtistCircle => get(OsuIconMapping.FeaturedArtistCircle);
public static IconUsage GameplayA => get(OsuIconMapping.GameplayA);
public static IconUsage GameplayB => get(OsuIconMapping.GameplayB);
public static IconUsage GameplayC => get(OsuIconMapping.GameplayC);
public static IconUsage Global => get(OsuIconMapping.Global);
public static IconUsage Graphics => get(OsuIconMapping.Graphics);
public static IconUsage Heart => get(OsuIconMapping.Heart);
public static IconUsage Home => get(OsuIconMapping.Home);
public static IconUsage Input => get(OsuIconMapping.Input);
public static IconUsage Maintenance => get(OsuIconMapping.Maintenance);
public static IconUsage Megaphone => get(OsuIconMapping.Megaphone);
public static IconUsage Music => get(OsuIconMapping.Music);
public static IconUsage News => get(OsuIconMapping.News);
public static IconUsage Next => get(OsuIconMapping.Next);
public static IconUsage NextCircle => get(OsuIconMapping.NextCircle);
public static IconUsage Notification => get(OsuIconMapping.Notification);
public static IconUsage Online => get(OsuIconMapping.Online);
public static IconUsage Play => get(OsuIconMapping.Play);
public static IconUsage Player => get(OsuIconMapping.Player);
public static IconUsage PlayerFollow => get(OsuIconMapping.PlayerFollow);
public static IconUsage Prev => get(OsuIconMapping.Prev);
public static IconUsage PrevCircle => get(OsuIconMapping.PrevCircle);
public static IconUsage Ranking => get(OsuIconMapping.Ranking);
public static IconUsage Rulesets => get(OsuIconMapping.Rulesets);
public static IconUsage Search => get(OsuIconMapping.Search);
public static IconUsage Settings => get(OsuIconMapping.Settings);
public static IconUsage SkinA => get(OsuIconMapping.SkinA);
public static IconUsage SkinB => get(OsuIconMapping.SkinB);
public static IconUsage Star => get(OsuIconMapping.Star);
public static IconUsage Storyboard => get(OsuIconMapping.Storyboard);
public static IconUsage Team => get(OsuIconMapping.Team);
public static IconUsage ThumbsUp => get(OsuIconMapping.ThumbsUp);
public static IconUsage Tournament => get(OsuIconMapping.Tournament);
public static IconUsage Twitter => get(OsuIconMapping.Twitter);
public static IconUsage UserInterface => get(OsuIconMapping.UserInterface);
public static IconUsage Wiki => get(OsuIconMapping.Wiki);
public static IconUsage EditorAddControlPoint => get(OsuIconMapping.EditorAddControlPoint);
public static IconUsage EditorConvertToStream => get(OsuIconMapping.EditorConvertToStream);
public static IconUsage EditorDistanceSnap => get(OsuIconMapping.EditorDistanceSnap);
public static IconUsage EditorFinish => get(OsuIconMapping.EditorFinish);
public static IconUsage EditorGridSnap => get(OsuIconMapping.EditorGridSnap);
public static IconUsage EditorNewComboA => get(OsuIconMapping.EditorNewComboA);
public static IconUsage EditorNewComboB => get(OsuIconMapping.EditorNewComboB);
public static IconUsage EditorSelect => get(OsuIconMapping.EditorSelect);
public static IconUsage EditorSound => get(OsuIconMapping.EditorSound);
public static IconUsage EditorWhistle => get(OsuIconMapping.EditorWhistle);
private static IconUsage get(OsuIconMapping glyph) => new IconUsage((char)glyph, FONT_NAME);
private enum OsuIconMapping
{
[Description(@"audio")]
Audio,
[Description(@"beatmap")]
Beatmap,
[Description(@"calendar")]
Calendar,
[Description(@"changelog-a")]
ChangelogA,
[Description(@"changelog-b")]
ChangelogB,
[Description(@"chat")]
Chat,
[Description(@"check-circle")]
CheckCircle,
[Description(@"collapse-a")]
CollapseA,
[Description(@"collections")]
Collections,
[Description(@"cross")]
Cross,
[Description(@"cross-circle")]
CrossCircle,
[Description(@"crown")]
Crown,
[Description(@"debug")]
Debug,
[Description(@"delete")]
Delete,
[Description(@"details")]
Details,
[Description(@"discord")]
Discord,
[Description(@"ellipsis-horizontal")]
EllipsisHorizontal,
[Description(@"ellipsis-vertical")]
EllipsisVertical,
[Description(@"expand-a")]
ExpandA,
[Description(@"expand-b")]
ExpandB,
[Description(@"featured-artist")]
FeaturedArtist,
[Description(@"featured-artist-circle")]
FeaturedArtistCircle,
[Description(@"gameplay-a")]
GameplayA,
[Description(@"gameplay-b")]
GameplayB,
[Description(@"gameplay-c")]
GameplayC,
[Description(@"global")]
Global,
[Description(@"graphics")]
Graphics,
[Description(@"heart")]
Heart,
[Description(@"home")]
Home,
[Description(@"input")]
Input,
[Description(@"maintenance")]
Maintenance,
[Description(@"megaphone")]
Megaphone,
[Description(@"music")]
Music,
[Description(@"news")]
News,
[Description(@"next")]
Next,
[Description(@"next-circle")]
NextCircle,
[Description(@"notification")]
Notification,
[Description(@"online")]
Online,
[Description(@"play")]
Play,
[Description(@"player")]
Player,
[Description(@"player-follow")]
PlayerFollow,
[Description(@"prev")]
Prev,
[Description(@"prev-circle")]
PrevCircle,
[Description(@"ranking")]
Ranking,
[Description(@"rulesets")]
Rulesets,
[Description(@"search")]
Search,
[Description(@"settings")]
Settings,
[Description(@"skin-a")]
SkinA,
[Description(@"skin-b")]
SkinB,
[Description(@"star")]
Star,
[Description(@"storyboard")]
Storyboard,
[Description(@"team")]
Team,
[Description(@"thumbs-up")]
ThumbsUp,
[Description(@"tournament")]
Tournament,
[Description(@"twitter")]
Twitter,
[Description(@"user-interface")]
UserInterface,
[Description(@"wiki")]
Wiki,
[Description(@"Editor/add-control-point")]
EditorAddControlPoint = 1000,
[Description(@"Editor/convert-to-stream")]
EditorConvertToStream,
[Description(@"Editor/distance-snap")]
EditorDistanceSnap,
[Description(@"Editor/finish")]
EditorFinish,
[Description(@"Editor/grid-snap")]
EditorGridSnap,
[Description(@"Editor/new-combo-a")]
EditorNewComboA,
[Description(@"Editor/new-combo-b")]
EditorNewComboB,
[Description(@"Editor/select")]
EditorSelect,
[Description(@"Editor/sound")]
EditorSound,
[Description(@"Editor/whistle")]
EditorWhistle,
}
public class OsuIconStore : ITextureStore, ITexturedGlyphLookupStore
{
private readonly TextureStore textures;
public OsuIconStore(TextureStore textures)
{
this.textures = textures;
}
public ITexturedCharacterGlyph? Get(string? fontName, char character)
{
if (fontName == FONT_NAME)
return new Glyph(textures.Get($@"{fontName}/{((OsuIconMapping)character).GetDescription()}"));
return null;
}
public Task<ITexturedCharacterGlyph?> GetAsync(string fontName, char character) => Task.Run(() => Get(fontName, character));
public Texture? Get(string name, WrapMode wrapModeS, WrapMode wrapModeT) => null;
public Texture Get(string name) => throw new NotImplementedException();
public Task<Texture> GetAsync(string name, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public Stream GetStream(string name) => throw new NotImplementedException();
public IEnumerable<string> GetAvailableResources() => throw new NotImplementedException();
public Task<Texture?> GetAsync(string name, WrapMode wrapModeS, WrapMode wrapModeT, CancellationToken cancellationToken = default) => throw new NotImplementedException();
public class Glyph : ITexturedCharacterGlyph
{
public float XOffset => default;
public float YOffset => default;
public float XAdvance => default;
public float Baseline => default;
public char Character => default;
public float GetKerning<T>(T lastGlyph) where T : ICharacterGlyph => throw new NotImplementedException();
public Texture Texture { get; }
public float Width => Texture.Width;
public float Height => Texture.Height;
public Glyph(Texture texture)
{
Texture = texture;
}
}
public void Dispose()
{
textures.Dispose();
}
}
#endregion
}
}

View File

@ -20,12 +20,12 @@ namespace osu.Game.Localisation
public static LocalisableString ChangelogDescription => new TranslatableString(getKey(@"changelog_description"), @"track recent dev updates in the osu! ecosystem");
/// <summary>
/// "view your friends and other information"
/// "view your friends and spectate other players"
/// </summary>
public static LocalisableString DashboardDescription => new TranslatableString(getKey(@"dashboard_description"), @"view your friends and other information");
public static LocalisableString DashboardDescription => new TranslatableString(getKey(@"dashboard_description"), @"view your friends and spectate other players");
/// <summary>
/// "find out who's the best right now"
/// "find out who&#39;s the best right now"
/// </summary>
public static LocalisableString RankingsDescription => new TranslatableString(getKey(@"rankings_description"), @"find out who's the best right now");
@ -39,6 +39,6 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString WikiDescription => new TranslatableString(getKey(@"wiki_description"), @"knowledge base");
private static string getKey(string key) => $"{prefix}:{key}";
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -478,7 +478,7 @@ namespace osu.Game
AddFont(Resources, @"Fonts/Venera/Venera-Bold");
AddFont(Resources, @"Fonts/Venera/Venera-Black");
Fonts.AddStore(new HexaconsIcons.HexaconsStore(Textures));
Fonts.AddStore(new OsuIcon.OsuIconStore(Textures));
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.BeatmapListing
{
Title = PageTitleStrings.MainBeatmapsetsControllerIndex;
Description = NamedOverlayComponentStrings.BeatmapListingDescription;
Icon = HexaconsIcons.Beatmap;
Icon = OsuIcon.Beatmap;
}
}
}

View File

@ -60,7 +60,7 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapHeaderTitle()
{
Title = PageTitleStrings.MainBeatmapsetsControllerShow;
Icon = HexaconsIcons.Beatmap;
Icon = OsuIcon.Beatmap;
}
}
}

View File

@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Changelog
{
Title = PageTitleStrings.MainChangelogControllerDefault;
Description = NamedOverlayComponentStrings.ChangelogDescription;
Icon = HexaconsIcons.Devtools;
Icon = OsuIcon.ChangelogB;
}
}
}

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Chat
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Icon = HexaconsIcons.Messaging,
Icon = OsuIcon.Chat,
Size = new Vector2(24),
},
// Placeholder text

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays
{
public partial class ChatOverlay : OsuFocusedOverlayContainer, INamedOverlayComponent, IKeyBindingHandler<PlatformAction>
{
public IconUsage Icon => HexaconsIcons.Messaging;
public IconUsage Icon => OsuIcon.Chat;
public LocalisableString Title => ChatStrings.HeaderTitle;
public LocalisableString Description => ChatStrings.HeaderDescription;

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Dashboard
{
Title = PageTitleStrings.MainHomeControllerIndex;
Description = NamedOverlayComponentStrings.DashboardDescription;
Icon = HexaconsIcons.Social;
Icon = OsuIcon.Global;
}
}
}

View File

@ -69,7 +69,7 @@ namespace osu.Game.Overlays.News
{
Title = PageTitleStrings.MainNewsControllerDefault;
Description = NamedOverlayComponentStrings.NewsDescription;
Icon = HexaconsIcons.News;
Icon = OsuIcon.News;
}
}
}

View File

@ -29,7 +29,7 @@ namespace osu.Game.Overlays
{
public partial class NotificationOverlay : OsuFocusedOverlayContainer, INamedOverlayComponent, INotificationOverlay
{
public IconUsage Icon => HexaconsIcons.Notification;
public IconUsage Icon => OsuIcon.Notification;
public LocalisableString Title => NotificationsStrings.HeaderTitle;
public LocalisableString Description => NotificationsStrings.HeaderDescription;

View File

@ -29,7 +29,7 @@ namespace osu.Game.Overlays
{
public partial class NowPlayingOverlay : OsuFocusedOverlayContainer, INamedOverlayComponent
{
public IconUsage Icon => HexaconsIcons.Music;
public IconUsage Icon => OsuIcon.Music;
public LocalisableString Title => NowPlayingStrings.HeaderTitle;
public LocalisableString Description => NowPlayingStrings.HeaderDescription;

View File

@ -87,7 +87,7 @@ namespace osu.Game.Overlays.Profile
public ProfileHeaderTitle()
{
Title = PageTitleStrings.MainUsersControllerDefault;
Icon = HexaconsIcons.Profile;
Icon = OsuIcon.Player;
}
}
}

View File

@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Rankings
{
Title = PageTitleStrings.MainRankingControllerDefault;
Description = NamedOverlayComponentStrings.RankingsDescription;
Icon = HexaconsIcons.Rankings;
Icon = OsuIcon.Ranking;
}
}
}

View File

@ -6,6 +6,7 @@ using System.Linq;
using osu.Framework.Localisation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Audio;
@ -17,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.VolumeUp
Icon = OsuIcon.Audio
};
public override IEnumerable<LocalisableString> FilterTerms => base.FilterTerms.Concat(new LocalisableString[] { "sound" });

View File

@ -5,6 +5,7 @@ using osu.Framework.Development;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.DebugSettings;
@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.Bug
Icon = OsuIcon.Debug
};
public DebugSection()

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Gameplay;
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Regular.DotCircle
Icon = OsuIcon.GameplayC
};
public GameplaySection()

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.Cog
Icon = OsuIcon.Settings
};
[BackgroundDependencyLoader]

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Graphics;
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.Laptop
Icon = OsuIcon.Graphics
};
public GraphicsSection()

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Handlers;
using osu.Framework.Localisation;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Input;
@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.Keyboard
Icon = OsuIcon.Input
};
public InputSection(KeyBindingPanel keyConfig)

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Maintenance;
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.Wrench
Icon = OsuIcon.Maintenance
};
public MaintenanceSection()

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Online;
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.GlobeAsia
Icon = OsuIcon.Online
};
public OnlineSection()

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Rulesets;
@ -18,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.Chess
Icon = OsuIcon.Rulesets
};
[BackgroundDependencyLoader]

View File

@ -14,6 +14,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Game.Database;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Localisation;
using osu.Game.Overlays.SkinEditor;
@ -31,7 +32,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.PaintBrush
Icon = OsuIcon.SkinB
};
private static readonly Live<SkinInfo> random_skin_info = new SkinInfo

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.UserInterface;
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections
public override Drawable CreateIcon() => new SpriteIcon
{
Icon = FontAwesome.Solid.LayerGroup
Icon = OsuIcon.UserInterface
};
public UserInterfaceSection()

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays
{
public partial class SettingsOverlay : SettingsPanel, INamedOverlayComponent
{
public IconUsage Icon => HexaconsIcons.Settings;
public IconUsage Icon => OsuIcon.Settings;
public LocalisableString Title => SettingsStrings.HeaderTitle;
public LocalisableString Description => SettingsStrings.HeaderDescription;

View File

@ -164,11 +164,11 @@ namespace osu.Game.Overlays.Toolbar
{
new ToolbarNewsButton(),
new ToolbarChangelogButton(),
new ToolbarWikiButton(),
new ToolbarRankingsButton(),
new ToolbarBeatmapListingButton(),
new ToolbarChatButton(),
new ToolbarSocialButton(),
new ToolbarWikiButton(),
new ToolbarMusicButton(),
//new ToolbarButton
//{

View File

@ -113,7 +113,7 @@ namespace osu.Game.Overlays.Toolbar
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Size = new Vector2(26),
Size = new Vector2(20),
Alpha = 0,
},
DrawableText = new OsuSpriteText

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar
{
TooltipMain = ToolbarStrings.HomeHeaderTitle;
TooltipSub = ToolbarStrings.HomeHeaderDescription;
SetIcon(HexaconsIcons.Home);
SetIcon(OsuIcon.Home);
}
}
}

View File

@ -82,7 +82,7 @@ namespace osu.Game.Overlays.Wiki
{
Title = PageTitleStrings.MainWikiControllerDefault;
Description = NamedOverlayComponentStrings.WikiDescription;
Icon = HexaconsIcons.Wiki;
Icon = OsuIcon.Wiki;
}
}
}

View File

@ -16,6 +16,7 @@ using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Framework.Utils;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Overlays;
@ -169,7 +170,7 @@ namespace osu.Game.Rulesets.Edit
public IEnumerable<TernaryButton> CreateTernaryButtons() => new[]
{
new TernaryButton(DistanceSnapToggle, "Distance Snap", () => new SpriteIcon { Icon = FontAwesome.Solid.Ruler })
new TernaryButton(DistanceSnapToggle, "Distance Snap", () => new SpriteIcon { Icon = OsuIcon.EditorDistanceSnap })
};
protected override bool OnKeyDown(KeyDownEvent e)

View File

@ -5,6 +5,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
namespace osu.Game.Rulesets.Edit.Tools
{
@ -15,7 +16,7 @@ namespace osu.Game.Rulesets.Edit.Tools
{
}
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.Solid.MousePointer };
public override Drawable CreateIcon() => new SpriteIcon { Icon = OsuIcon.EditorSelect };
public override PlacementBlueprint CreatePlacementBlueprint() => null;
}

View File

@ -51,7 +51,7 @@ namespace osu.Game.Screens.Edit.Components.Menus
Size = new Vector2(26),
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Icon = HexaconsIcons.Editor,
Icon = OsuIcon.EditCircle,
},
text = new TextFlowContainer
{

View File

@ -225,7 +225,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected virtual IEnumerable<TernaryButton> CreateTernaryButtons()
{
//TODO: this should only be enabled (visible?) for rulesets that provide combo-supporting HitObjects.
yield return new TernaryButton(NewCombo, "New combo", () => new SpriteIcon { Icon = FontAwesome.Regular.DotCircle });
yield return new TernaryButton(NewCombo, "New combo", () => new SpriteIcon { Icon = OsuIcon.EditorNewComboA });
foreach (var kvp in SelectionHandler.SelectionSampleStates)
yield return new TernaryButton(kvp.Value, kvp.Key.Replace("hit", string.Empty).Titleize(), () => getIconForSample(kvp.Key));
@ -272,10 +272,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
return new SpriteIcon { Icon = FontAwesome.Solid.Hands };
case HitSampleInfo.HIT_WHISTLE:
return new SpriteIcon { Icon = FontAwesome.Solid.Bullhorn };
return new SpriteIcon { Icon = OsuIcon.EditorWhistle };
case HitSampleInfo.HIT_FINISH:
return new SpriteIcon { Icon = FontAwesome.Solid.DrumSteelpan };
return new SpriteIcon { Icon = OsuIcon.EditorFinish };
}
return null;

View File

@ -80,7 +80,7 @@ namespace osu.Game.Screens.Edit.Setup
{
Title = EditorSetupStrings.BeatmapSetup.ToLower();
Description = EditorSetupStrings.BeatmapSetupDescription;
Icon = HexaconsIcons.Social;
Icon = OsuIcon.Beatmap;
}
}

View File

@ -13,7 +13,6 @@ using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Framework.Logging;
@ -103,8 +102,8 @@ namespace osu.Game.Screens.Menu
buttonArea.AddRange(new Drawable[]
{
new MainMenuButton(ButtonSystemStrings.Settings, string.Empty, FontAwesome.Solid.Cog, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
backButton = new MainMenuButton(ButtonSystemStrings.Back, @"back-to-top", OsuIcon.LeftCircle, new Color4(51, 58, 94, 255), () => State = ButtonSystemState.TopLevel,
new MainMenuButton(ButtonSystemStrings.Settings, string.Empty, OsuIcon.Settings, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
backButton = new MainMenuButton(ButtonSystemStrings.Back, @"back-to-top", OsuIcon.PrevCircle, new Color4(51, 58, 94, 255), () => State = ButtonSystemState.TopLevel,
-WEDGE_WIDTH)
{
VisibleStateMin = ButtonSystemState.Play,
@ -128,18 +127,18 @@ namespace osu.Game.Screens.Menu
[BackgroundDependencyLoader]
private void load(AudioManager audio, IdleTracker? idleTracker, GameHost host)
{
buttonsPlay.Add(new MainMenuButton(ButtonSystemStrings.Solo, @"button-default-select", FontAwesome.Solid.User, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
buttonsPlay.Add(new MainMenuButton(ButtonSystemStrings.Multi, @"button-default-select", FontAwesome.Solid.Users, new Color4(94, 63, 186, 255), onMultiplayer, 0, Key.M));
buttonsPlay.Add(new MainMenuButton(ButtonSystemStrings.Playlists, @"button-default-select", OsuIcon.Charts, new Color4(94, 63, 186, 255), onPlaylists, 0, Key.L));
buttonsPlay.Add(new MainMenuButton(ButtonSystemStrings.Solo, @"button-default-select", OsuIcon.Player, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
buttonsPlay.Add(new MainMenuButton(ButtonSystemStrings.Multi, @"button-default-select", OsuIcon.Online, new Color4(94, 63, 186, 255), onMultiplayer, 0, Key.M));
buttonsPlay.Add(new MainMenuButton(ButtonSystemStrings.Playlists, @"button-default-select", OsuIcon.Tournament, new Color4(94, 63, 186, 255), onPlaylists, 0, Key.L));
buttonsPlay.ForEach(b => b.VisibleState = ButtonSystemState.Play);
buttonsEdit.Add(new MainMenuButton(EditorStrings.BeatmapEditor.ToLower(), @"button-default-select", HexaconsIcons.Beatmap, new Color4(238, 170, 0, 255), () => OnEditBeatmap?.Invoke(), WEDGE_WIDTH, Key.B));
buttonsEdit.Add(new MainMenuButton(SkinEditorStrings.SkinEditor.ToLower(), @"button-default-select", HexaconsIcons.Editor, new Color4(220, 160, 0, 255), () => OnEditSkin?.Invoke(), 0, Key.S));
buttonsEdit.Add(new MainMenuButton(EditorStrings.BeatmapEditor.ToLower(), @"button-default-select", OsuIcon.Beatmap, new Color4(238, 170, 0, 255), () => OnEditBeatmap?.Invoke(), WEDGE_WIDTH, Key.B));
buttonsEdit.Add(new MainMenuButton(SkinEditorStrings.SkinEditor.ToLower(), @"button-default-select", OsuIcon.SkinB, new Color4(220, 160, 0, 255), () => OnEditSkin?.Invoke(), 0, Key.S));
buttonsEdit.ForEach(b => b.VisibleState = ButtonSystemState.Edit);
buttonsTopLevel.Add(new MainMenuButton(ButtonSystemStrings.Play, @"button-play-select", OsuIcon.Logo, new Color4(102, 68, 204, 255), () => State = ButtonSystemState.Play, WEDGE_WIDTH, Key.P));
buttonsTopLevel.Add(new MainMenuButton(ButtonSystemStrings.Edit, @"button-play-select", OsuIcon.EditCircle, new Color4(238, 170, 0, 255), () => State = ButtonSystemState.Edit, 0, Key.E));
buttonsTopLevel.Add(new MainMenuButton(ButtonSystemStrings.Browse, @"button-default-select", OsuIcon.ChevronDownCircle, new Color4(165, 204, 0, 255), () => OnBeatmapListing?.Invoke(), 0, Key.B, Key.D));
buttonsTopLevel.Add(new MainMenuButton(ButtonSystemStrings.Browse, @"button-default-select", OsuIcon.Beatmap, new Color4(165, 204, 0, 255), () => OnBeatmapListing?.Invoke(), 0, Key.B, Key.D));
if (host.CanExit)
buttonsTopLevel.Add(new MainMenuButton(ButtonSystemStrings.Exit, string.Empty, OsuIcon.CrossCircle, new Color4(238, 51, 153, 255), () => OnExit?.Invoke(), 0, Key.Q));

View File

@ -37,7 +37,7 @@
</PackageReference>
<PackageReference Include="Realm" Version="11.5.0" />
<PackageReference Include="ppy.osu.Framework" Version="2023.1227.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.1225.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.1228.0" />
<PackageReference Include="Sentry" Version="3.40.0" />
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
<PackageReference Include="SharpCompress" Version="0.33.0" />