mirror of
https://github.com/ppy/osu
synced 2025-02-09 22:57:37 +00:00
Add empty RoomSettingsOverlay.
This commit is contained in:
parent
b8e403f38a
commit
8c97999de9
26
osu.Game.Tests/Visual/TestCaseRoomSettings.cs
Normal file
26
osu.Game.Tests/Visual/TestCaseRoomSettings.cs
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Screens.Multi.Screens.Match;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseRoomSettings : OsuTestCase
|
||||
{
|
||||
public TestCaseRoomSettings()
|
||||
{
|
||||
RoomSettingsOverlay overlay;
|
||||
|
||||
Add(overlay = new RoomSettingsOverlay
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Height = 0.75f,
|
||||
});
|
||||
|
||||
AddStep(@"toggle", overlay.ToggleVisibility);
|
||||
}
|
||||
}
|
||||
}
|
51
osu.Game/Screens/Multi/Screens/Match/RoomSettingsOverlay.cs
Normal file
51
osu.Game/Screens/Multi/Screens/Match/RoomSettingsOverlay.cs
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Screens.Match
|
||||
{
|
||||
public class RoomSettingsOverlay : OsuFocusedOverlayContainer
|
||||
{
|
||||
private const float transition_duration = 500;
|
||||
|
||||
private readonly Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
public RoomSettingsOverlay()
|
||||
{
|
||||
InternalChild = content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
RelativePositionAxes = Axes.Y,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.FromHex(@"28242d"),
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
Content.MoveToY(0, transition_duration, Easing.OutSine);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
base.PopOut();
|
||||
|
||||
Content.MoveToY(-1, transition_duration, Easing.InSine);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user