1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-27 14:50:45 +08:00

Expire instead of hiding and disabling visibility state

Since it's a temporary change until the spectator interface gets
improved, no need to add further logic.
This commit is contained in:
Salman Ahmed
2021-08-13 07:28:57 +03:00
Unverified
parent 1892db7f37
commit 8dc7a925e7
4 changed files with 5 additions and 11 deletions
@@ -4,7 +4,6 @@
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Scoring;
@@ -36,8 +35,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
spectatorPlayerClock.WaitingOnFrames.BindTo(waitingOnFrames);
HUDOverlay.PlayerSettingsOverlay.State.Value = Visibility.Hidden;
HUDOverlay.PlayerSettingsOverlay.State.Disabled = true;
HUDOverlay.PlayerSettingsOverlay.Expire();
}
protected override void UpdateAfterChildren()
@@ -23,7 +23,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
[BackgroundDependencyLoader]
private void load()
{
PlayerSettingsGroups.Alpha = 0f;
PlayerSettingsGroups.Expire();
}
protected override void LogoArriving(OsuLogo logo, bool resuming)
@@ -57,7 +57,7 @@ namespace osu.Game.Screens.Play.HUD
if (e.ControlPressed)
{
if (e.Key == Key.H && ReplayLoaded && !State.Disabled)
if (e.Key == Key.H && ReplayLoaded)
{
ToggleVisibility();
return true;
+2 -6
View File
@@ -240,17 +240,13 @@ namespace osu.Game.Screens.Play
if (e.NewValue)
{
if (!PlayerSettingsOverlay.State.Disabled)
PlayerSettingsOverlay.Show();
PlayerSettingsOverlay.Show();
ModDisplay.FadeIn(200);
KeyCounter.Margin = new MarginPadding(10) { Bottom = 30 };
}
else
{
if (!PlayerSettingsOverlay.State.Disabled)
PlayerSettingsOverlay.Hide();
PlayerSettingsOverlay.Hide();
ModDisplay.Delay(2000).FadeOut(200);
KeyCounter.Margin = new MarginPadding(10);
}