mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 13:02:54 +08:00
Make LoginOverlay and OptionsOverlay focused containers.
This commit is contained in:
parent
a6f02106a4
commit
5eb3ef3948
@ -14,7 +14,7 @@ using OpenTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
class LoginOverlay : OverlayContainer
|
class LoginOverlay : FocusedOverlayContainer
|
||||||
{
|
{
|
||||||
private LoginOptions optionsSection;
|
private LoginOptions optionsSection;
|
||||||
|
|
||||||
@ -64,6 +64,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
|
base.PopIn();
|
||||||
|
|
||||||
optionsSection.Bounding = true;
|
optionsSection.Bounding = true;
|
||||||
FadeIn(transition_time, EasingTypes.OutQuint);
|
FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ using osu.Game.Overlays.Options.Sections;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class OptionsOverlay : OverlayContainer
|
public class OptionsOverlay : FocusedOverlayContainer
|
||||||
{
|
{
|
||||||
internal const float CONTENT_MARGINS = 10;
|
internal const float CONTENT_MARGINS = 10;
|
||||||
|
|
||||||
@ -159,26 +159,10 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state) => true;
|
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
|
||||||
|
|
||||||
protected override bool OnClick(InputState state) => true;
|
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
|
||||||
{
|
|
||||||
switch (args.Key)
|
|
||||||
{
|
|
||||||
case Key.Escape:
|
|
||||||
if (State == Visibility.Hidden) return false;
|
|
||||||
Hide();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return base.OnKeyDown(state, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
|
base.PopIn();
|
||||||
|
|
||||||
scrollContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
scrollContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
sidebar.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
sidebar.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint);
|
||||||
FadeTo(1, TRANSITION_LENGTH / 2);
|
FadeTo(1, TRANSITION_LENGTH / 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user