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

@ -176,7 +176,7 @@ namespace osu.Game.Tests.Visual.UserInterface
/// Checks if a cursor is visible.
/// </summary>
/// <param name="cursorContainer">The cursor to check.</param>
private bool checkVisible(CursorContainer cursorContainer) => cursorContainer.State == Visibility.Visible;
private bool checkVisible(CursorContainer cursorContainer) => cursorContainer.State.Value == Visibility.Visible;
/// <summary>
/// Checks if a cursor is at the current inputmanager screen position.
@ -218,7 +218,7 @@ namespace osu.Game.Tests.Visual.UserInterface
},
Cursor = new TestCursorContainer
{
State = providesUserCursor ? Visibility.Hidden : Visibility.Visible,
State = { Value = providesUserCursor ? Visibility.Hidden : Visibility.Visible },
}
};
}

View File

@ -23,8 +23,8 @@ namespace osu.Game.Tests.Visual.UserInterface
};
Add(mc);
AddToggleStep(@"toggle visibility", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
AddStep(@"show", () => mc.State = Visibility.Visible);
AddToggleStep(@"toggle visibility", state => mc.State.Value = state ? Visibility.Visible : Visibility.Hidden);
AddStep(@"show", () => mc.Show());
AddToggleStep(@"toggle beatmap lock", state => Beatmap.Disabled = state);
}
}

View File

@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Content.Add(displayedCount);
void setState(Visibility state) => AddStep(state.ToString(), () => manager.State = state);
void setState(Visibility state) => AddStep(state.ToString(), () => manager.State.Value = state);
void checkProgressingCount(int expected) => AddAssert($"progressing count is {expected}", () => progressingNotifications.Count == expected);
manager.UnreadCount.ValueChanged += count => { displayedCount.Text = $"displayed count: {count.NewValue}"; };

View File

@ -16,7 +16,7 @@ namespace osu.Game.Tests.Visual.UserInterface
var popup = new PopupDialog
{
RelativeSizeAxes = Axes.Both,
State = Framework.Graphics.Containers.Visibility.Visible,
State = { Value = Framework.Graphics.Containers.Visibility.Visible },
Icon = FontAwesome.Solid.AssistiveListeningSystems,
HeaderText = @"This is a test popup",
BodyText = "I can say lots of stuff and even wrap my words!",