Neg_Utils/NEG/UI/Popup/IPopup.cs

27 lines
753 B
C#

using JetBrains.Annotations;
using NEG.UI.Area;
using System;
namespace NEG.UI.Popup
{
[PublicAPI]
public interface IPopup
{
/// <summary>
/// Event to fire when popup is closed
/// </summary>
event Action<PopupData> OnPopupClosed;
/// <summary>
/// Show popup
/// </summary>
/// <param name="data">data assigned to popup, used to give info that popup is closed</param>
public void Show(PopupData data);
/// <summary>
/// Close popup or mark as closed if not visible
/// </summary>
/// <param name="silence">if true hide visually, without firing callbacks to properly close</param>
void Close(bool silence = false);
}
}