internal virtual void Display() { if (IsDisplayed) { return; } if (ChatEngine.IsVisible && !AllowChatOverlay) { ChatEngine.HideChat(); chatToggle = true; } for (int i = spriteManager.SpriteList.Count - 1; i > -1; i--) { pDrawable s = spriteManager.SpriteList[i]; if (s.Transformations.Count > 0 && s.Transformations[0].Time2 < GameBase.Time) { s.Transformations.ForEach(t => { t.Time1 += GameBase.Time; t.Time2 += GameBase.Time; }); } if (s.Transformations.Count == 0 && s.InitialColour != Color.TransparentWhite) { s.FadeInFromZero(300); } } IsDisplayed = true; }
internal static void LeaveLobby(bool changeMode) { if (!Joined) { return; } Joined = false; Matches.Clear(); BanchoClient.SendRequest(RequestType.Osu_LobbyPart, null); if (Status == LobbyStatus.Idle) { ChatEngine.RemoveChannel(@"#lobby"); if (!chatOpenOnStart) { ChatEngine.HideChat(); } Status = LobbyStatus.NotJoined; } if (changeMode) { AudioEngine.PlaySamplePositional(@"menuback"); Status = LobbyStatus.NotJoined; GameBase.ChangeMode(OsuModes.Menu); } }
internal virtual void Close(bool isCancel = false) { if (!IsDisplayed) { return; } foreach (pSprite p in spriteManager.SpriteList) { p.FadeOut(120); p.HandleInput = false; p.AlwaysDraw = false; } if (isCancel && cancelAction != null) { cancelAction(this, null); } if (Closed != null) { Closed(this, null); } if (chatToggle && !AllowChatOverlay) { if (ChatEngine.IsVisible) { ChatEngine.HideChat(); } else { ChatEngine.RestoreLastState(); } } IsDisplayed = false; Dispose(); }