Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove daily challenge tooltip from main menu #29417

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 1 addition & 33 deletions osu.Game/Screens/Menu/DailyChallengeButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Beatmaps.Drawables.Cards;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Localisation;
Expand All @@ -30,7 +28,7 @@

namespace osu.Game.Screens.Menu
{
public partial class DailyChallengeButton : MainMenuButton, IHasCustomTooltip<APIBeatmapSet?>
public partial class DailyChallengeButton : MainMenuButton
{
public Room? Room { get; private set; }

Expand Down Expand Up @@ -201,36 +199,6 @@ protected override void UpdateState()
base.UpdateState();
}

public ITooltip<APIBeatmapSet?> GetCustomTooltip() => new DailyChallengeTooltip();

public APIBeatmapSet? TooltipContent { get; private set; }

internal partial class DailyChallengeTooltip : CompositeDrawable, ITooltip<APIBeatmapSet?>
{
[Cached]
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);

private APIBeatmapSet? lastContent;

[BackgroundDependencyLoader]
private void load()
{
AutoSizeAxes = Axes.Both;
}

public void Move(Vector2 pos) => Position = pos;

public void SetContent(APIBeatmapSet? content)
{
if (content == lastContent)
return;

lastContent = content;

ClearInternal();
if (content != null)
AddInternal(new BeatmapCardNano(content));
}
}
}
}
Loading