1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 15:17:44 +08:00

Fixed tooltip inheritors of RoundedButton

This commit is contained in:
OliBomby 2024-10-01 15:34:12 +02:00
parent 4de73dd9c8
commit 9fa2849b14
4 changed files with 7 additions and 10 deletions

View File

@ -108,6 +108,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
}
public bool FilteringActive { get; set; }
public LocalisableString TooltipText { get; set; }
public virtual LocalisableString TooltipText { get; set; }
}
}

View File

@ -7,7 +7,6 @@ using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterface;
@ -21,7 +20,7 @@ using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
namespace osu.Game.Overlays.BeatmapSet.Buttons
{
public partial class FavouriteButton : HeaderButton, IHasTooltip
public partial class FavouriteButton : HeaderButton
{
public readonly Bindable<APIBeatmapSet> BeatmapSet = new Bindable<APIBeatmapSet>();
@ -32,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
private readonly IBindable<APIUser> localUser = new Bindable<APIUser>();
public LocalisableString TooltipText
public override LocalisableString TooltipText
{
get
{

View File

@ -12,7 +12,7 @@ using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.Overlays.Settings
{
public partial class SettingsButton : RoundedButton, IHasTooltip, IConditionalFilterable
public partial class SettingsButton : RoundedButton, IConditionalFilterable
{
public SettingsButton()
{
@ -20,8 +20,6 @@ namespace osu.Game.Overlays.Settings
Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS };
}
public LocalisableString TooltipText { get; set; }
public IEnumerable<string> Keywords { get; set; } = Array.Empty<string>();
public BindableBool CanBeShown { get; } = new BindableBool(true);

View File

@ -3,7 +3,6 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Online;
@ -11,7 +10,7 @@ using osu.Game.Online.Rooms;
namespace osu.Game.Screens.OnlinePlay.Components
{
public abstract partial class ReadyButton : RoundedButton, IHasTooltip
public abstract partial class ReadyButton : RoundedButton
{
public new readonly BindableBool Enabled = new BindableBool();
@ -29,7 +28,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
private void updateState() =>
base.Enabled.Value = availability.Value.State == DownloadState.LocallyAvailable && Enabled.Value;
public virtual LocalisableString TooltipText
public override LocalisableString TooltipText
{
get
{