Apply tooltip to bookmark pieces too

Bookmarks don't show on real beatmaps, but they do show in test scenes
(namely `TestSceneEditorSummaryTimeline`).

Also does some more changes to adjust the markers to the latest updates
to other markers.
This commit is contained in:
Bartłomiej Dach 2024-07-12 11:10:52 +02:00
parent 2453e2fd00
commit 217b01d303
No known key found for this signature in database
2 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,9 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Localisation;
using osu.Game.Extensions;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations; using osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations;
@ -19,16 +22,17 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
Add(new BookmarkVisualisation(bookmark)); Add(new BookmarkVisualisation(bookmark));
} }
private partial class BookmarkVisualisation : PointVisualisation private partial class BookmarkVisualisation : PointVisualisation, IHasTooltip
{ {
public BookmarkVisualisation(double startTime) public BookmarkVisualisation(double startTime)
: base(startTime) : base(startTime)
{ {
Width = 2;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) => Colour = colours.Blue; private void load(OsuColour colours) => Colour = colours.Blue;
public LocalisableString TooltipText => $"{StartTime.ToEditorFormattedString()} bookmark";
} }
} }
} }

View File

@ -71,7 +71,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Height = 0.35f Height = 0.4f
}, },
new BreakPart new BreakPart
{ {