mirror of
https://github.com/ppy/osu
synced 2025-04-18 04:55:43 +00:00
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:
parent
2453e2fd00
commit
217b01d303
@ -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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user