mirror of
https://github.com/ppy/osu
synced 2025-04-11 03:31:46 +00:00
Remove full-screen background layer and add half-height holder.
Doesn't interact well with dialog popups. May add back later with complementing logic.
This commit is contained in:
parent
fb6c25edf8
commit
b0ee728528
@ -18,10 +18,7 @@ namespace osu.Desktop.VisualTests
|
|||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
var overlay = new BeatmapOptionsOverlay
|
var overlay = new BeatmapOptionsOverlay();
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
};
|
|
||||||
|
|
||||||
Add(overlay);
|
Add(overlay);
|
||||||
|
|
||||||
|
@ -17,9 +17,8 @@ namespace osu.Game.Screens.Select.Options
|
|||||||
{
|
{
|
||||||
private const float transition_duration = 500;
|
private const float transition_duration = 500;
|
||||||
private const float x_position = 290;
|
private const float x_position = 290;
|
||||||
private const float height = 100;
|
|
||||||
|
|
||||||
private Container background;
|
private Box holder;
|
||||||
private FillFlowContainer<BeatmapOptionsButton> buttonsContainer;
|
private FillFlowContainer<BeatmapOptionsButton> buttonsContainer;
|
||||||
|
|
||||||
public Action OnRemoveFromUnplayed;
|
public Action OnRemoveFromUnplayed;
|
||||||
@ -36,7 +35,8 @@ namespace osu.Game.Screens.Select.Options
|
|||||||
|
|
||||||
buttonsContainer.Alpha = 1;
|
buttonsContainer.Alpha = 1;
|
||||||
|
|
||||||
background.FadeIn(transition_duration, EasingTypes.OutQuint);
|
holder.ScaleTo(new Vector2(1, 1), transition_duration / 2, EasingTypes.OutQuint);
|
||||||
|
|
||||||
buttonsContainer.MoveToX(x_position, transition_duration, EasingTypes.OutQuint);
|
buttonsContainer.MoveToX(x_position, transition_duration, EasingTypes.OutQuint);
|
||||||
buttonsContainer.TransformSpacingTo(Vector2.Zero, transition_duration, EasingTypes.OutQuint);
|
buttonsContainer.TransformSpacingTo(Vector2.Zero, transition_duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
@ -45,7 +45,8 @@ namespace osu.Game.Screens.Select.Options
|
|||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
|
||||||
background.FadeOut(transition_duration, EasingTypes.InSine);
|
holder.ScaleTo(new Vector2(1, 0), transition_duration / 2, EasingTypes.InSine);
|
||||||
|
|
||||||
buttonsContainer.MoveToX(DrawWidth, transition_duration, EasingTypes.InSine);
|
buttonsContainer.MoveToX(DrawWidth, transition_duration, EasingTypes.InSine);
|
||||||
buttonsContainer.TransformSpacingTo(new Vector2(200f, 0f), transition_duration, EasingTypes.InSine);
|
buttonsContainer.TransformSpacingTo(new Vector2(200f, 0f), transition_duration, EasingTypes.InSine);
|
||||||
|
|
||||||
@ -59,20 +60,22 @@ namespace osu.Game.Screens.Select.Options
|
|||||||
|
|
||||||
public BeatmapOptionsOverlay()
|
public BeatmapOptionsOverlay()
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
Anchor = Anchor.BottomLeft;
|
||||||
|
Origin = Anchor.BottomLeft;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
background = new Container
|
holder = new Box
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
{
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Height = 0.5f,
|
||||||
|
Scale = new Vector2(1, 0),
|
||||||
Colour = Color4.Black.Opacity(0.5f),
|
Colour = Color4.Black.Opacity(0.5f),
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
buttonsContainer = new FillFlowContainer<BeatmapOptionsButton>
|
buttonsContainer = new FillFlowContainer<BeatmapOptionsButton>
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.X,
|
AutoSizeAxes = Axes.X,
|
||||||
|
@ -129,9 +129,6 @@ namespace osu.Game.Screens.Select
|
|||||||
},
|
},
|
||||||
beatmapOptions = new BeatmapOptionsOverlay
|
beatmapOptions = new BeatmapOptionsOverlay
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.BottomCentre,
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
OnRemoveFromUnplayed = null,
|
OnRemoveFromUnplayed = null,
|
||||||
OnClearLocalScores = null,
|
OnClearLocalScores = null,
|
||||||
OnEdit = null,
|
OnEdit = null,
|
||||||
|
Loading…
Reference in New Issue
Block a user