protected virtual void CloseButtonPressed(GUIControl control) { IsHidden = true; if (m_Modal != null) { m_Modal.DelayedDelete(); m_Modal = null; } if (m_DeleteOnClose) { ParentControl.RemoveChild(this, true); } }
protected virtual void CloseButtonPressed(Base control, EventArgs args) { if (OnClose != null) OnClose(this, EventArgs.Empty); IsHidden = true; if (m_Modal != null) { m_Modal.DelayedDelete(); m_Modal = null; } if (m_DeleteOnClose) { Parent.RemoveChild(this, true); } }
/// <summary> /// Makes the window modal: covers the whole canvas and gets all input. /// </summary> /// <param name="dim">Determines whether all the background should be dimmed.</param> public void MakeModal(bool dim) { if (m_Modal != null) return; m_Modal = new Modal(GetCanvas()); ParentControl = m_Modal; if (dim) m_Modal.ShouldDrawBackground = true; else m_Modal.ShouldDrawBackground = false; }
/// <summary> /// Makes the window modal: covers the whole canvas and gets all input. /// </summary> /// <param name="dim">Determines whether all the background should be dimmed.</param> public void MakeModal(bool dim = false) { if (m_Modal != null) return; m_Modal = new Modal(GetCanvas()); Parent = m_Modal; m_Modal.ShouldDrawBackground = dim; }