Maelstrom: Stubbed in the About panels, will hook up the animation and icons tomorrow.

https://github.com/libsdl-org/Maelstrom/commit/c9336cc023a94b14d27f2a0b1e9a08745dc25e5e

From c9336cc023a94b14d27f2a0b1e9a08745dc25e5e Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 25 Oct 2011 01:59:54 -0400
Subject: [PATCH] Stubbed in the About panels, will hook up the animation and
 icons tomorrow.

---
 Maelstrom_Globals.h     |  2 +-
 UI/about_credits.xml    | 63 +++++++++++++++++++++++++++++++++++++++++
 UI/about_game.xml       | 49 ++++++++++++++++++++++++++++++++
 UI/about_story.xml      | 49 ++++++++++++++++++++++++++++++++
 main.cpp                |  3 +-
 netlogic/about.cpp      |  2 ++
 screenlib/UIArea.cpp    |  9 ++++++
 screenlib/UIManager.cpp |  3 +-
 8 files changed, 175 insertions(+), 5 deletions(-)
 create mode 100644 UI/about_credits.xml
 create mode 100644 UI/about_game.xml
 create mode 100644 UI/about_story.xml

diff --git a/Maelstrom_Globals.h b/Maelstrom_Globals.h
index 89829976..22b05327 100644
--- a/Maelstrom_Globals.h
+++ b/Maelstrom_Globals.h
@@ -99,7 +99,7 @@ extern Bool	gNetScores;
 #define PANEL_MAIN	"main"
 #define PANEL_GAME	"game"
 #define PANEL_GAMEOVER	"gameover"
-#define PANEL_ABOUT	"about"
+#define PANEL_ABOUT	"about_story"
 #define PANEL_CONTROLS	"controls"
 
 // Sound resource definitions...
diff --git a/UI/about_credits.xml b/UI/about_credits.xml
new file mode 100644
index 00000000..e0eb06f3
--- /dev/null
+++ b/UI/about_credits.xml
@@ -0,0 +1,63 @@
+<UIPanel>
+	<Elements>
+		<Title name="image" id="135">
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Title>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="514" h="386"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="516" h="388"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="518" h="390"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="520" h="392"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0xC3" g="0xC3" b="0xFF"/>
+			<Size w="522" h="394"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="524" h="396"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="526" h="398"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+
+		<!-- Porting credits -->
+		<Rectangle fill="true">
+			<Color r="0x00" g="0x00" b="0x00"/>
+			<Size w="338" h="62"/>
+			<Anchor anchorFrom="TOPLEFT" anchorTo="TOPLEFT" anchor="image" x="166" y="282"/>
+		</Rectangle>
+		<Label name="port_label" fontName="New York" fontSize="18" text="Port to SDL:   ">
+			<Color r="0xFF" g="0xFF" b="0x55"/>
+			<Anchor anchorFrom="TOPLEFT" anchorTo="TOPLEFT" anchor="image" x="188" y="298"/>
+		</Label>
+		<Label fontName="New York" fontSize="18" text="Sam Lantinga">
+			<Color r="0xFF" g="0xFF" b="0xFF"/>
+			<Anchor anchorFrom="LEFT" anchorTo="RIGHT" anchor="port_label"/>
+		</Label>
+
+		<!-- Buttons -->
+		<Button hotkey="any" clickPanel="main" clickSound="131">
+			<SizeParent/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Button>
+	</Elements>
+</UIPanel>
diff --git a/UI/about_game.xml b/UI/about_game.xml
new file mode 100644
index 00000000..0f62b0b5
--- /dev/null
+++ b/UI/about_game.xml
@@ -0,0 +1,49 @@
+<UIPanel>
+	<Elements>
+		<Title name="image" id="134">
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Title>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="514" h="386"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="516" h="388"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="518" h="390"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="520" h="392"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0xC3" g="0xC3" b="0xFF"/>
+			<Size w="522" h="394"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="524" h="396"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="526" h="398"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+
+		<!-- Buttons -->
+		<Button hotkey="any" clickPanel="main" clickSound="106"/>
+		<Button hotkey="Return" clickPanel="about_credits" clickSound="102">
+			<SizeParent/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Button>
+	</Elements>
+</UIPanel>
diff --git a/UI/about_story.xml b/UI/about_story.xml
new file mode 100644
index 00000000..7b7c59a0
--- /dev/null
+++ b/UI/about_story.xml
@@ -0,0 +1,49 @@
+<UIPanel>
+	<Elements>
+		<Title name="image" id="133">
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Title>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="514" h="386"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="516" h="388"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="518" h="390"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="520" h="392"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0xC3" g="0xC3" b="0xFF"/>
+			<Size w="522" h="394"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x9C" g="0x9C" b="0xFF"/>
+			<Size w="524" h="396"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+		<Rectangle>
+			<Color r="0x75" g="0x75" b="0xFF"/>
+			<Size w="526" h="398"/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Rectangle>
+
+		<!-- Buttons -->
+		<Button hotkey="any" clickPanel="main" clickSound="106"/>
+		<Button hotkey="Return" clickPanel="about_game" clickSound="102">
+			<SizeParent/>
+			<Anchor anchorFrom="CENTER" anchorTo="CENTER"/>
+		</Button>
+	</Elements>
+</UIPanel>
diff --git a/main.cpp b/main.cpp
index 3a0254b7..36f28ecc 100644
--- a/main.cpp
+++ b/main.cpp
@@ -39,8 +39,7 @@ static void DrawMainScreen(void);
 // Main Menu actions:
 static void RunDoAbout(void)
 {
-	gNoDelay = 0;
-	DoAbout();
+	ui->ShowPanel(PANEL_ABOUT);
 }
 static void RunConfigureControls(void)
 {
diff --git a/netlogic/about.cpp b/netlogic/about.cpp
index 7619b6fd..1392a3ed 100644
--- a/netlogic/about.cpp
+++ b/netlogic/about.cpp
@@ -29,6 +29,8 @@ void DoAbout(void)
 	ltClr = screen->MapRGB(40000>>8, 40000>>8, 0xFF);
 	ltrClr = screen->MapRGB(50000>>8, 50000>>8, 0xFF);
 
+	gNoDelay = 0;
+
 	while ( ! done ) {
 		/* -- Handle updates */
 		if ( next_screen ) {
diff --git a/screenlib/UIArea.cpp b/screenlib/UIArea.cpp
index 1666c371..c8ccf746 100644
--- a/screenlib/UIArea.cpp
+++ b/screenlib/UIArea.cpp
@@ -93,6 +93,15 @@ UIArea::Load(rapidxml::xml_node<> *node)
 		}
 	}
 
+	child = node->first_node("sizeParent", 0, false);
+	if (child) {
+		UIArea *parent;
+
+		parent = GetAnchorElement(NULL);
+		m_rect.w = parent->Width();
+		m_rect.h = parent->Height();
+	}
+
 	child = node->first_node("anchor", 0, false);
 	if (child) {
 		int x, y;
diff --git a/screenlib/UIManager.cpp b/screenlib/UIManager.cpp
index d2a4b2ff..d57366c6 100644
--- a/screenlib/UIManager.cpp
+++ b/screenlib/UIManager.cpp
@@ -120,8 +120,7 @@ UIManager::ShowPanel(UIPanel *panel)
 		if (panel->IsFullscreen()) {
 			for (unsigned int i = m_visible.length(); i--; ) {
 				if (m_visible[i]->IsFullscreen()) {
-					m_visible[i]->Hide();
-					m_screen->FadeOut();
+					HidePanel(m_visible[i]);
 					break;
 				}
 			}