mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Revert "Use fades instead of event listening. Fixed same issue in the playlist room creation."
This reverts commit 3a7608275d
.
This commit is contained in:
@ -180,40 +180,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
State = { Value = client.Room == null ? Visibility.Visible : Visibility.Hidden }
|
State = { Value = client.Room == null ? Visibility.Visible : Visibility.Hidden }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnEntering(IScreen last)
|
subScreenContainer.Hide();
|
||||||
{
|
client.RoomUpdated += roomUpdated;
|
||||||
base.OnEntering(last);
|
|
||||||
|
|
||||||
subScreenContainer.FadeOut().Delay(1000).FadeIn(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnExiting(IScreen next)
|
|
||||||
{
|
|
||||||
if (base.OnExiting(next))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
subScreenContainer.FadeOut();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnResuming(IScreen last)
|
|
||||||
{
|
|
||||||
base.OnResuming(last);
|
|
||||||
|
|
||||||
if (client.Room == null)
|
|
||||||
subScreenContainer.FadeOut().Delay(1000).FadeIn(500);
|
|
||||||
else
|
|
||||||
subScreenContainer.FadeInFromZero();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnSuspending(IScreen next)
|
|
||||||
{
|
|
||||||
subScreenContainer.FadeOut();
|
|
||||||
|
|
||||||
base.OnSuspending(next);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -294,6 +263,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
readyClickOperation = null;
|
readyClickOperation = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void roomUpdated()
|
||||||
|
{
|
||||||
|
if (client.Room != null)
|
||||||
|
{
|
||||||
|
// If the room is updated and is not null, show the room sub screen container and unsubscribe.
|
||||||
|
subScreenContainer.Show();
|
||||||
|
client.RoomUpdated -= roomUpdated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
@ -33,8 +33,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
|
|
||||||
private OverlinedHeader participantsHeader;
|
private OverlinedHeader participantsHeader;
|
||||||
|
|
||||||
private GridContainer subScreenContainer;
|
|
||||||
|
|
||||||
public PlaylistsRoomSubScreen(Room room)
|
public PlaylistsRoomSubScreen(Room room)
|
||||||
{
|
{
|
||||||
Title = room.RoomID.Value == null ? "New playlist" : room.Name.Value;
|
Title = room.RoomID.Value == null ? "New playlist" : room.Name.Value;
|
||||||
@ -46,7 +44,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
subScreenContainer = new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Content = new[]
|
Content = new[]
|
||||||
@ -197,40 +195,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
public override void OnEntering(IScreen last)
|
|
||||||
{
|
|
||||||
base.OnEntering(last);
|
|
||||||
|
|
||||||
subScreenContainer.FadeOut().Delay(1000).FadeIn(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnExiting(IScreen next)
|
|
||||||
{
|
|
||||||
if (base.OnExiting(next))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
subScreenContainer.FadeOut();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnResuming(IScreen last)
|
|
||||||
{
|
|
||||||
base.OnResuming(last);
|
|
||||||
|
|
||||||
if (roomId.Value == null)
|
|
||||||
subScreenContainer.FadeOut().Delay(1000).FadeIn(500);
|
|
||||||
else
|
|
||||||
subScreenContainer.FadeInFromZero();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnSuspending(IScreen next)
|
|
||||||
{
|
|
||||||
subScreenContainer.FadeOut();
|
|
||||||
|
|
||||||
base.OnSuspending(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
Reference in New Issue
Block a user