Merge remote-tracking branch 'origin/update-visibility-container' into update-framework

This commit is contained in:
Dean Herbert
2019-06-11 19:28:36 +09:00
48 changed files with 135 additions and 126 deletions

View File

@ -54,7 +54,7 @@ namespace osu.Game.Graphics.Containers
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
StateChanged += onStateChanged;
State.ValueChanged += onStateChanged;
}
/// <summary>
@ -70,7 +70,7 @@ namespace osu.Game.Graphics.Containers
{
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
{
State = Visibility.Hidden;
Hide();
return true;
}
@ -82,7 +82,7 @@ namespace osu.Game.Graphics.Containers
switch (action)
{
case GlobalAction.Back:
State = Visibility.Hidden;
Hide();
return true;
case GlobalAction.Select:
@ -94,9 +94,9 @@ namespace osu.Game.Graphics.Containers
public bool OnReleased(GlobalAction action) => false;
private void onStateChanged(Visibility visibility)
private void onStateChanged(ValueChangedEvent<Visibility> state)
{
switch (visibility)
switch (state.NewValue)
{
case Visibility.Visible:
if (OverlayActivationMode.Value != OverlayActivation.Disabled)
@ -105,7 +105,7 @@ namespace osu.Game.Graphics.Containers
if (BlockScreenWideMouse && DimMainContent) osuGame?.AddBlockingOverlay(this);
}
else
State = Visibility.Hidden;
Hide();
break;

View File

@ -103,7 +103,7 @@ namespace osu.Game.Graphics.Containers
protected override void PopIn()
{
foreach (var w in wavesContainer.Children)
w.State = Visibility.Visible;
w.Show();
this.FadeIn(100, Easing.OutQuint);
contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint);
@ -117,7 +117,7 @@ namespace osu.Game.Graphics.Containers
contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, Easing.In);
foreach (var w in wavesContainer.Children)
w.State = Visibility.Hidden;
w.Hide();
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint);
}

View File

@ -29,7 +29,7 @@ namespace osu.Game.Graphics.Cursor
{
AddRangeInternal(new Drawable[]
{
Cursor = new MenuCursor { State = Visibility.Hidden },
Cursor = new MenuCursor { State = { Value = Visibility.Hidden } },
content = new Container { RelativeSizeAxes = Axes.Both }
});
}

View File

@ -82,6 +82,10 @@ namespace osu.Game.Graphics.UserInterface
}
}
public override void Hide() => State = Visibility.Hidden;
public override void Show() => State = Visibility.Visible;
public BreadcrumbTabItem(T value)
: base(value)
{

View File

@ -34,7 +34,7 @@ namespace osu.Game.Graphics.UserInterface
RelativeSizeAxes = Axes.Both,
Alpha = 0.9f,
},
new LoadingAnimation { State = Visibility.Visible }
new LoadingAnimation { State = { Value = Visibility.Visible } }
};
}