From 365819865e04b490c30784b8fec3805a7a1fdb66 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 1 Jun 2022 21:00:14 +0900 Subject: [PATCH] Remove 'submit' sample usages --- osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs | 2 +- osu.Game/Graphics/UserInterface/BackButton.cs | 2 +- osu.Game/Graphics/UserInterface/DialogButton.cs | 4 ++-- osu.Game/Graphics/UserInterface/ExternalLinkButton.cs | 2 +- osu.Game/Graphics/UserInterface/HoverSampleSet.cs | 3 --- osu.Game/Online/Chat/DrawableLinkCompiler.cs | 1 - osu.Game/Overlays/News/NewsCard.cs | 2 -- osu.Game/Overlays/News/Sidebar/MonthSection.cs | 2 -- .../Overlays/Profile/Sections/BeatmapMetadataContainer.cs | 2 -- osu.Game/Screens/OnlinePlay/Lounge/DrawableLoungeRoom.cs | 2 +- osu.Game/Screens/Select/Options/BeatmapOptionsButton.cs | 2 +- osu.Game/Users/Drawables/ClickableAvatar.cs | 6 ------ osu.Game/Users/Drawables/UpdateableFlag.cs | 2 +- osu.Game/Users/UserPanel.cs | 2 +- 14 files changed, 9 insertions(+), 25 deletions(-) diff --git a/osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs b/osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs index 9a17d6dc9b..08aaa8da42 100644 --- a/osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs +++ b/osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs @@ -35,7 +35,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards protected readonly BeatmapDownloadTracker DownloadTracker; protected BeatmapCard(APIBeatmapSet beatmapSet, bool allowExpansion = true) - : base(HoverSampleSet.Submit) + : base(HoverSampleSet.Button) { Expanded = new BindableBool { Disabled = !allowExpansion }; diff --git a/osu.Game/Graphics/UserInterface/BackButton.cs b/osu.Game/Graphics/UserInterface/BackButton.cs index 1b564ef1b4..2b59ee0282 100644 --- a/osu.Game/Graphics/UserInterface/BackButton.cs +++ b/osu.Game/Graphics/UserInterface/BackButton.cs @@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface { Size = TwoLayerButton.SIZE_EXTENDED; - Child = button = new TwoLayerButton(HoverSampleSet.Submit) + Child = button = new TwoLayerButton { Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, diff --git a/osu.Game/Graphics/UserInterface/DialogButton.cs b/osu.Game/Graphics/UserInterface/DialogButton.cs index ad69ec4078..69fbd744c9 100644 --- a/osu.Game/Graphics/UserInterface/DialogButton.cs +++ b/osu.Game/Graphics/UserInterface/DialogButton.cs @@ -56,8 +56,8 @@ namespace osu.Game.Graphics.UserInterface private readonly SpriteText spriteText; private Vector2 hoverSpacing => new Vector2(3f, 0f); - public DialogButton() - : base(HoverSampleSet.Submit) + public DialogButton(HoverSampleSet sampleSet = HoverSampleSet.Button) + : base(sampleSet) { RelativeSizeAxes = Axes.X; diff --git a/osu.Game/Graphics/UserInterface/ExternalLinkButton.cs b/osu.Game/Graphics/UserInterface/ExternalLinkButton.cs index 0df69a5b54..1730e1478f 100644 --- a/osu.Game/Graphics/UserInterface/ExternalLinkButton.cs +++ b/osu.Game/Graphics/UserInterface/ExternalLinkButton.cs @@ -36,7 +36,7 @@ namespace osu.Game.Graphics.UserInterface Icon = FontAwesome.Solid.ExternalLinkAlt, RelativeSizeAxes = Axes.Both }, - new HoverClickSounds(HoverSampleSet.Submit) + new HoverClickSounds() }; } diff --git a/osu.Game/Graphics/UserInterface/HoverSampleSet.cs b/osu.Game/Graphics/UserInterface/HoverSampleSet.cs index a5ea6fcfbf..b88f81a143 100644 --- a/osu.Game/Graphics/UserInterface/HoverSampleSet.cs +++ b/osu.Game/Graphics/UserInterface/HoverSampleSet.cs @@ -10,9 +10,6 @@ namespace osu.Game.Graphics.UserInterface [Description("default")] Default, - [Description("submit")] - Submit, - [Description("button")] Button, diff --git a/osu.Game/Online/Chat/DrawableLinkCompiler.cs b/osu.Game/Online/Chat/DrawableLinkCompiler.cs index 8356b36667..3b0d049528 100644 --- a/osu.Game/Online/Chat/DrawableLinkCompiler.cs +++ b/osu.Game/Online/Chat/DrawableLinkCompiler.cs @@ -38,7 +38,6 @@ namespace osu.Game.Online.Chat } public DrawableLinkCompiler(IEnumerable parts) - : base(HoverSampleSet.Submit) { Parts = parts.ToList(); } diff --git a/osu.Game/Overlays/News/NewsCard.cs b/osu.Game/Overlays/News/NewsCard.cs index 68d0704825..5ce0b9df9c 100644 --- a/osu.Game/Overlays/News/NewsCard.cs +++ b/osu.Game/Overlays/News/NewsCard.cs @@ -14,7 +14,6 @@ using osu.Framework.Platform; using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; -using osu.Game.Graphics.UserInterface; using osu.Game.Online.API.Requests.Responses; namespace osu.Game.Overlays.News @@ -29,7 +28,6 @@ namespace osu.Game.Overlays.News private TextFlowContainer main; public NewsCard(APINewsPost post) - : base(HoverSampleSet.Submit) { this.post = post; diff --git a/osu.Game/Overlays/News/Sidebar/MonthSection.cs b/osu.Game/Overlays/News/Sidebar/MonthSection.cs index aa83f89689..e2ce25660e 100644 --- a/osu.Game/Overlays/News/Sidebar/MonthSection.cs +++ b/osu.Game/Overlays/News/Sidebar/MonthSection.cs @@ -18,7 +18,6 @@ using System.Diagnostics; using osu.Framework.Audio; using osu.Framework.Audio.Sample; using osu.Framework.Platform; -using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.News.Sidebar { @@ -129,7 +128,6 @@ namespace osu.Game.Overlays.News.Sidebar private readonly APINewsPost post; public PostButton(APINewsPost post) - : base(HoverSampleSet.Submit) { this.post = post; diff --git a/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs b/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs index 94ef5e5d86..13465f3bf8 100644 --- a/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs +++ b/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs @@ -6,7 +6,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; using osu.Game.Graphics.Containers; -using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Profile.Sections { @@ -18,7 +17,6 @@ namespace osu.Game.Overlays.Profile.Sections private readonly IBeatmapInfo beatmapInfo; protected BeatmapMetadataContainer(IBeatmapInfo beatmapInfo) - : base(HoverSampleSet.Submit) { this.beatmapInfo = beatmapInfo; diff --git a/osu.Game/Screens/OnlinePlay/Lounge/DrawableLoungeRoom.cs b/osu.Game/Screens/OnlinePlay/Lounge/DrawableLoungeRoom.cs index 35c903eb0c..0015cf8bf9 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/DrawableLoungeRoom.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/DrawableLoungeRoom.cs @@ -55,7 +55,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge private void load(AudioManager audio) { sampleSelect = audio.Samples.Get($@"UI/{HoverSampleSet.Default.GetDescription()}-select"); - sampleJoin = audio.Samples.Get($@"UI/{HoverSampleSet.Submit.GetDescription()}-select"); + sampleJoin = audio.Samples.Get($@"UI/{HoverSampleSet.Button.GetDescription()}-select"); AddRangeInternal(new Drawable[] { diff --git a/osu.Game/Screens/Select/Options/BeatmapOptionsButton.cs b/osu.Game/Screens/Select/Options/BeatmapOptionsButton.cs index 6ecb96f723..df7dd47ef3 100644 --- a/osu.Game/Screens/Select/Options/BeatmapOptionsButton.cs +++ b/osu.Game/Screens/Select/Options/BeatmapOptionsButton.cs @@ -77,7 +77,7 @@ namespace osu.Game.Screens.Select.Options public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => box.ReceivePositionalInputAt(screenSpacePos); public BeatmapOptionsButton() - : base(HoverSampleSet.Submit) + : base(HoverSampleSet.Button) { Width = width; RelativeSizeAxes = Axes.Y; diff --git a/osu.Game/Users/Drawables/ClickableAvatar.cs b/osu.Game/Users/Drawables/ClickableAvatar.cs index 0dd135b500..d85648c078 100644 --- a/osu.Game/Users/Drawables/ClickableAvatar.cs +++ b/osu.Game/Users/Drawables/ClickableAvatar.cs @@ -7,7 +7,6 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Input.Events; using osu.Framework.Localisation; using osu.Game.Graphics.Containers; -using osu.Game.Graphics.UserInterface; using osu.Game.Online.API.Requests.Responses; namespace osu.Game.Users.Drawables @@ -74,11 +73,6 @@ namespace osu.Game.Users.Drawables { private LocalisableString tooltip = default_tooltip_text; - public ClickableArea() - : base(HoverSampleSet.Submit) - { - } - public override LocalisableString TooltipText { get => Enabled.Value ? tooltip : default; diff --git a/osu.Game/Users/Drawables/UpdateableFlag.cs b/osu.Game/Users/Drawables/UpdateableFlag.cs index e5debc0683..d0ef760e59 100644 --- a/osu.Game/Users/Drawables/UpdateableFlag.cs +++ b/osu.Game/Users/Drawables/UpdateableFlag.cs @@ -49,7 +49,7 @@ namespace osu.Game.Users.Drawables { RelativeSizeAxes = Axes.Both }, - new HoverClickSounds(HoverSampleSet.Submit) + new HoverClickSounds() } }; } diff --git a/osu.Game/Users/UserPanel.cs b/osu.Game/Users/UserPanel.cs index 248debf1d3..40d70ca406 100644 --- a/osu.Game/Users/UserPanel.cs +++ b/osu.Game/Users/UserPanel.cs @@ -32,7 +32,7 @@ namespace osu.Game.Users protected Drawable Background { get; private set; } protected UserPanel(APIUser user) - : base(HoverSampleSet.Submit) + : base(HoverSampleSet.Button) { if (user == null) throw new ArgumentNullException(nameof(user));