mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge remote-tracking branch 'origin/update-visibility-container' into update-framework
This commit is contained in:
@ -28,7 +28,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
protected override void AddCheckSteps()
|
||||
{
|
||||
AddUntilStep("wait for fail", () => Player.HasFailed);
|
||||
AddUntilStep("wait for fail overlay", () => ((FailPlayer)Player).FailOverlay.State == Visibility.Visible);
|
||||
AddUntilStep("wait for fail overlay", () => ((FailPlayer)Player).FailOverlay.State.Value == Visibility.Visible);
|
||||
}
|
||||
|
||||
private class FailPlayer : TestPlayer
|
||||
|
@ -97,7 +97,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddStep("Show overlay", () => pauseOverlay.Show());
|
||||
|
||||
AddStep("Press select", () => press(GlobalAction.Select));
|
||||
AddAssert("Overlay still open", () => pauseOverlay.State == Visibility.Visible);
|
||||
AddAssert("Overlay still open", () => pauseOverlay.State.Value == Visibility.Visible);
|
||||
|
||||
AddStep("Hide overlay", () => pauseOverlay.Hide());
|
||||
}
|
||||
@ -237,7 +237,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
});
|
||||
|
||||
AddAssert("Action was triggered", () => triggered);
|
||||
AddAssert("Overlay is closed", () => pauseOverlay.State == Visibility.Hidden);
|
||||
AddAssert("Overlay is closed", () => pauseOverlay.State.Value == Visibility.Hidden);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -272,7 +272,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
return triggered;
|
||||
});
|
||||
AddAssert("Overlay is closed", () => pauseOverlay.State == Visibility.Hidden);
|
||||
AddAssert("Overlay is closed", () => pauseOverlay.State.Value == Visibility.Hidden);
|
||||
}
|
||||
|
||||
private void press(Key key)
|
||||
|
@ -203,9 +203,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
public new HUDOverlay HUDOverlay => base.HUDOverlay;
|
||||
|
||||
public bool FailOverlayVisible => FailOverlay.State == Visibility.Visible;
|
||||
public bool FailOverlayVisible => FailOverlay.State.Value == Visibility.Visible;
|
||||
|
||||
public bool PauseOverlayVisible => PauseOverlay.State == Visibility.Visible;
|
||||
public bool PauseOverlayVisible => PauseOverlay.State.Value == Visibility.Visible;
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
State = Visibility.Visible,
|
||||
State = { Value = Visibility.Visible },
|
||||
});
|
||||
|
||||
AddStep("Restart", restart);
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.Menus
|
||||
|
||||
public TestSceneToolbar()
|
||||
{
|
||||
var toolbar = new Toolbar { State = Visibility.Visible };
|
||||
var toolbar = new Toolbar { State = { Value = Visibility.Visible } };
|
||||
ToolbarNotificationButton notificationButton = null;
|
||||
|
||||
AddStep("create toolbar", () =>
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
settings = new TestRoomSettings
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
State = Visibility.Visible
|
||||
State = { Value = Visibility.Visible }
|
||||
};
|
||||
|
||||
Child = settings;
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
api.Logout();
|
||||
api.LocalUser.BindValueChanged(user => { userPanelArea.Child = new UserPanel(user.NewValue) { Width = 200 }; }, true);
|
||||
|
||||
AddStep("show", () => accountCreation.State = Visibility.Visible);
|
||||
AddStep("show", () => accountCreation.Show());
|
||||
AddStep("logout", () => api.Logout());
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Children = new Drawable[]
|
||||
{
|
||||
channelManager,
|
||||
new ChatOverlay { State = Visibility.Visible }
|
||||
new ChatOverlay { State = { Value = Visibility.Visible } }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
{
|
||||
settings = new SettingsOverlay
|
||||
{
|
||||
State = Visibility.Visible
|
||||
State = { Value = Visibility.Visible }
|
||||
};
|
||||
Add(dialogOverlay = new DialogOverlay
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
@ -7,7 +7,6 @@ using JetBrains.Annotations;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets;
|
||||
@ -48,7 +47,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
AddStep("show", () =>
|
||||
{
|
||||
infoWedge.State = Visibility.Visible;
|
||||
infoWedge.Show();
|
||||
infoWedge.Beatmap = Beatmap.Value;
|
||||
});
|
||||
|
||||
@ -57,11 +56,11 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
AddWaitStep("wait for select", 3);
|
||||
|
||||
AddStep("hide", () => { infoWedge.State = Visibility.Hidden; });
|
||||
AddStep("hide", () => { infoWedge.Hide(); });
|
||||
|
||||
AddWaitStep("wait for hide", 3);
|
||||
|
||||
AddStep("show", () => { infoWedge.State = Visibility.Visible; });
|
||||
AddStep("show", () => { infoWedge.Show(); });
|
||||
|
||||
foreach (var rulesetInfo in rulesets.AvailableRulesets)
|
||||
{
|
||||
|
@ -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 },
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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}"; };
|
||||
|
@ -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!",
|
||||
|
Reference in New Issue
Block a user