mirror of https://github.com/ppy/osu
Add skin customisation support to song progress display
This commit is contained in:
parent
3c84b0d8c6
commit
434e63d629
|
@ -14,6 +14,7 @@
|
|||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
|
@ -71,8 +72,14 @@ public IEnumerable<HitObject> Objects
|
|||
|
||||
public SongProgress()
|
||||
{
|
||||
Masking = true;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SongProgressDisplay
|
||||
{
|
||||
Masking = true,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
info = new SongProgressInfo
|
||||
|
@ -96,6 +103,8 @@ public SongProgress()
|
|||
Origin = Anchor.BottomLeft,
|
||||
OnSeek = time => RequestSeek?.Invoke(time),
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -175,5 +184,11 @@ private void updateInfoMargin()
|
|||
float finalMargin = bottom_bar_height + (AllowSeeking.Value ? handle_size.Y : 0) + (ShowGraph.Value ? graph_height : 0);
|
||||
info.TransformTo(nameof(info.Margin), new MarginPadding { Bottom = finalMargin }, transition_duration, Easing.In);
|
||||
}
|
||||
|
||||
public class SongProgressDisplay : Container, ISkinnableComponent
|
||||
{
|
||||
// TODO: move actual implementation into this.
|
||||
// exists for skin customisation purposes.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue