/// <summary> /// Removes a modal overlay from the scene. /// </summary> public void PopModal(ModalOverlay overlay) { while (_modals.Count > 0) { var popped = _modals.Pop(); if (popped == overlay) break; if (_modals.Count == 0) throw new Exception("Error popping modal. The render list doesn't contain the given modal overlay"); } }
/// <summary> /// Shows a modal overlay on top of the rest of the renderables. /// </summary> public void ShowModal(ModalOverlay modalOverlay) { RenderList.PushModal(modalOverlay); modalOverlay.Closed += OnCloseModalOverlay; modalOverlay.OnShown(this); }
/// <summary> /// Add a modal overlay to the scene. /// </summary> public void PushModal(ModalOverlay overlay) { _modals.Push(overlay); }