Adjust editor timeline current marker to promote tick visibility

This commit is contained in:
Dean Herbert 2020-04-27 10:54:32 +09:00
parent 2737726f93
commit 48168dddce
2 changed files with 11 additions and 4 deletions

View File

@ -12,14 +12,14 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
public class CentreMarker : CompositeDrawable public class CentreMarker : CompositeDrawable
{ {
private const float triangle_width = 20; private const float triangle_width = 15;
private const float triangle_height = 10; private const float triangle_height = 10;
private const float bar_width = 2; private const float bar_width = 2;
public CentreMarker() public CentreMarker()
{ {
RelativeSizeAxes = Axes.Y; RelativeSizeAxes = Axes.Y;
Size = new Vector2(20, 1); Size = new Vector2(triangle_width, 1);
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
@ -39,6 +39,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Size = new Vector2(triangle_width, triangle_height), Size = new Vector2(triangle_width, triangle_height),
Scale = new Vector2(1, -1) Scale = new Vector2(1, -1)
},
new Triangle
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Size = new Vector2(triangle_width, triangle_height),
Scale = new Vector2(1, 1)
} }
}; };
} }
@ -46,7 +53,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
Colour = colours.Red; Colour = colours.RedDark;
} }
} }
} }

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
}); });
// We don't want the centre marker to scroll // We don't want the centre marker to scroll
AddInternal(new CentreMarker()); AddInternal(new CentreMarker { Depth = float.MaxValue });
WaveformVisible.ValueChanged += visible => waveform.FadeTo(visible.NewValue ? 1 : 0, 200, Easing.OutQuint); WaveformVisible.ValueChanged += visible => waveform.FadeTo(visible.NewValue ? 1 : 0, 200, Easing.OutQuint);