Maelstrom: Added a way to hide all the dialogs

https://github.com/libsdl-org/Maelstrom/commit/47a3c8df2c6d9bc318c5da81f3f6d65733422a35

From 47a3c8df2c6d9bc318c5da81f3f6d65733422a35 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 14 Oct 2012 10:57:20 -0700
Subject: [PATCH] Added a way to hide all the dialogs

---
 screenlib/UIManager.cpp | 11 +++++++++++
 screenlib/UIManager.h   |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/screenlib/UIManager.cpp b/screenlib/UIManager.cpp
index 7ec28915..e14bf46f 100644
--- a/screenlib/UIManager.cpp
+++ b/screenlib/UIManager.cpp
@@ -246,6 +246,17 @@ UIManager::DeletePanel(UIPanel *panel)
 	}
 }
 
+void
+UIManager::HideDialogs()
+{
+	for (int i = m_visible.length()-1; i >= 0; --i) {
+		UIPanel *panel = m_visible[i];
+		if (!panel->IsFullscreen()) {
+			HidePanel(panel);
+		}
+	}
+}
+
 void
 UIManager::SetCondition(const char *token, bool isTrue)
 {
diff --git a/screenlib/UIManager.h b/screenlib/UIManager.h
index 5d5f08eb..a409dc6f 100644
--- a/screenlib/UIManager.h
+++ b/screenlib/UIManager.h
@@ -94,6 +94,8 @@ class UIManager : public UIArea, public UIFontInterface, public UIImageInterface
 		DeletePanel(GetPanel(name, false));
 	}
 
+	void HideDialogs();
+
 	void SetCondition(const char *token, bool isTrue = true);
 	bool CheckCondition(const char *condition);