mirror of
https://github.com/ppy/osu.git
synced 2026-05-19 00:30:19 +08:00
Add tooltip states for the FavouriteButton on SSV2
This commit is contained in:
@@ -156,10 +156,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
Margin = new MarginPadding { Left = -SongSelect.WEDGE_CONTENT_MARGIN },
|
||||
},
|
||||
favouriteButton = new FavouriteButton
|
||||
{
|
||||
TooltipText = BeatmapsStrings.StatusFavourites,
|
||||
},
|
||||
favouriteButton = new FavouriteButton(),
|
||||
lengthStatistic = new Statistic(OsuIcon.Clock),
|
||||
bpmStatistic = new Statistic(OsuIcon.Metronome)
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@ using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@@ -160,6 +161,8 @@ namespace osu.Game.Screens.SelectV2
|
||||
hoverLayer.FadeOut(500, Easing.OutQuint);
|
||||
}
|
||||
|
||||
public override LocalisableString TooltipText => isFavourite.Value ? BeatmapsetsStrings.ShowDetailsUnfavourite.ToSentence() : BeatmapsetsStrings.ShowDetailsFavourite.ToSentence();
|
||||
|
||||
// Note: `setLoading()` and `setBeatmapSet()` are called externally via their public counterparts by song select when the beatmap changes,
|
||||
// as well as internally in order to display the progress and result of the (un)favourite operation when the button is clicked.
|
||||
// In case of external calls, we want to cancel pending favourite requests, primarily to avoid a situation when a late success callback from an (un)favourite
|
||||
|
||||
Reference in New Issue
Block a user