<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>

<!DOCTYPE objects SYSTEM "../gui.dtd">

<objects>

	<!--
	==========================================
	- PROGRESS BAR FOR ARCHIVE BUILDER
	==========================================
	-->

	<object	name="ab"
			type="button"
			size="0 0 100% 100%"
			ghost="false"
			hotkey="archive.abort"
			sprite="bkFillBlack"			
	>
		<action on="Press"><![CDATA[
			// If the user aborts the archive, switch to the main menu.
			archiveBuilderCancel();
			startMainMenu();
		]]></action>  	
	
		<object name="abProgressBarText"
			type="text"
			size="25 100%-190 100%-25 100%-175"
			font="tahoma14"
			textcolor="255 255 255"
			text_align="center"
			text_valign="center"
		>
		Rebuilding Archive ... Press Alt+F4 or Left-Click to Cancel
		</object>

		<object name="abProgressBar"
			style="wheatProgressBarBlue"
			type="progressbar"
			size="25 100%-160 100%-25 100%-145"
		>
			<action on="Load"><![CDATA[
				// Reset progress bar to zero at start of game.
				this.caption = 0;
			]]></action>
			<action on="ArchiveBuilderProgress"><![CDATA[
				this.caption = g_ArchiveBuilderProgress;  
			]]></action>  
			<action on="ArchiveBuilderComplete"><![CDATA[
				// When the archive is finished, switch to the main menu.
				startMainMenu();
			]]></action>			
		</object>	
	</object>
	
	<!--
	==========================================
	- MAIN MENU - "COMMANDER'S TENT" BACKDROP
	==========================================
	-->

	<object	name="pg"
		type="image"
		sprite="pgBackground"
		hidden="true"
	>
		<!--
		==========================================
		- MAIN MENU - STATIC TOOLTIP WINDOW
		(Put at the top so that it is recognised by those using it.)
		==========================================
		-->

		<object	name="pgToolTip"
			style="fancyTextHeadWhite"
			type="text"
			hidden="true"
			sprite="bkTranslucent"
			size="69% 6.3802% 97.0703125% 28.125%"
		>tooltipText
		</object>		

		<!--
		==========================================
		- MAIN MENU - PROFILE MANAGER
		==========================================
		-->

		<object	name="pgProfile">
			<object	name="pgProfileHeading"
				style="wheatTextLabelWhite"
				type="text"
				size="3% 78% 20% 80%"
				font="verdana12i"
			>Current Profile:
			</object>

			<object	name="pgProfileName"
				style="wheatDropDown"
				type="dropdown"
				size="3% 80% 20% 80%+40"
			>
				<action on="Load"><![CDATA[
					// Get list of profile names (profile folders).
					var profileArray = buildFileList("profiles/", "user.cfg", true);

					// Populate profile list.		
					for (var profileIndex = 0; profileIndex < profileArray.length; profileIndex++)
					{
						// Remove path/file information so only profile name remains.
						profileArray[profileIndex] = profileArray[profileIndex].replace ("profiles/", "");
						profileArray[profileIndex] = profileArray[profileIndex].replace ("/settings/user.cfg", "");
						// Add profile name to the end of the object's list.
						if (profileArray[profileIndex] != "default/settings")
							pushItem (this.name, profileArray[profileIndex]);
					}

					// Select default profile (later we'll need to remember the last used profile).
					setCurrItemValue (this.name, "Player");
				]]></action>
			</object>
		</object>

		<!--
		==========================================
		- MAIN MENU - PARCHMENT BUTTONS
		==========================================
		-->

		<object name="pgCampaignsBt"
			style="pgButton"
			type="button"
			size="24.609375% 28.90625% 49.609375% 62.2395833%"
			sprite_over="pgCampaignsOver"
			sprite_disabled="pgCampaignsDisabled"
			tooltip="Want to play a campaign? Tough luck, buddy!  That's right, go cry on your mamma's shoulder."
		>
			<action on="Press"><![CDATA[
				openMainMenuSubWindow ("pgCampaigns");
			]]></action>
		</object>

		<object name="pgSinglePlayerBt"
			style="pgButton"
			type="button"
			size="51.2695312% 10.9275% 76.2695312% 44.270833%"
			sprite_over="pgSinglePlayerOver"
			sprite_disabled="pgSinglePlayerDisabled"
			tooltip="Want to move some Dudes around or test something? Click here to start a new game on the default map."
		>
			<action on="Press"><![CDATA[
				// Open Session Setup window.
				sessionType = "Skirmish"
				openSessionSetup ("");
			]]></action>
		</object>

		<object	name="pgMultiPlayerBt"
			style="pgButton"
			type="button"
			size="57.5195312% 38.28125% 82.5195312% 71.6145833%"
			sprite_over="pgMultiPlayerOver"
			sprite_disabled="pgMultiPlayerDisabled"
			tooltip="Tired of playing with yourself? Fight against one or more human players in a multiplayer game."
		>
			<action on="Press"><![CDATA[
				// Open Multiplayer connection window.
				openMainMenuSubWindow ("pgMPModeSel");
			]]></action>
		</object>

		<object name="pgEditorBt"
			style="pgButton"
			type="button"
			size="40.234375% 60.15625% 65.234375% 93.4895833%"
			sprite_over="pgEditorOver"
			sprite_disabled="pgEditorDisabled"
		>
			<action on="Load"><![CDATA[
				// Disable the Editor button if the Atlas DLL is not active.
//				if (ATLAS_IsAvailable() == true)
//				{
//					this.enabled = true;
//					this.tooltip = "Open 'Atlas', 0 A.D.'s Scenario Editor.";
//				}
//				else
//				{
					this.enabled = false;
					this.tooltip = "The Scenario Editor is not currently available.";
//				}
			]]></action>
			<action on="Press"><![CDATA[
				// Open Atlas Editor.
//				ATLAS_Run();
			]]></action>
		</object>

		<object name="pgOptionsBt"
			style="pgButton"
			type="button"
			size="74.7070312% 42.0572916% 99.7070312% 75.390625%"
			sprite_over="pgOptionsOver"
			sprite_disabled="pgOptionsDisabled"
			tooltip="This will take you to the options menu.  It does not work now, but someday it might."
		>
			<action on="Press"><![CDATA[
				// Open Options window.
				openMainMenuSubWindow ("pgOptions");
			]]></action>
		</object>

		<object name="pgHistoryBt"
			style="pgButton"
			type="button"
			size="72.265625% 66.5364583% 97.265625% 99.8697916%"
			sprite_over="pgHistoryOver"
			sprite_disabled="pgHistoryDisabled"
			tooltip="One day you will click this button and learn more about ancient history than any history teach ever taught you."
		>
			<action on="Press"><![CDATA[
				openMainMenuSubWindow ("pgHistory");
			]]></action>
		</object>

		<!--
		==========================================
		- MAIN MENU - GAME LOGO AND VERSION NUMBER
		==========================================
		-->

		<object	name="pgProductLogo"
			style="pgButton"
			type="button"
			ghost="true"
			size="21.1914062% 3.125% 68.0664062% 31.5104166%"
			sprite="pgProductLogo"
		>
		</object>

		<object	name="pgProductClick"
			style="pgButton"
			type="button"
			size="21.1914062% 3.125% 48.0664062% 31.5104166%"
			tooltip="Click this logo to roll credits."
		>
			<action on="Press"><![CDATA[
				// Get credits text.
				var creditsArray  = readFileLines("gui/text/credits.txt");

				// Populate credits list.		
				for (var creditsIndex = 0; creditsIndex < creditsArray.length; creditsIndex++)
				{
					// Add credit row to the end of the object's list.
					pushItem ("pgCredits", creditsArray[creditsIndex]);
				}

				// Ensure we start at the top of the list.
				getGUIObjectByName("pgCredits").selected = 0;

				// Set a timer to increment the list, therefore pushing it down the screen
				// (creating a pseudo-scrolling-credits effect).
				setInterval( updateCredits, 1, 200 );

				// Hide shell GUI (we want a blank screen with rolling text).
				guiHide ("pg");

				// Open the credits screen.
				openMainMenuSubWindow ("pgCredits");
			]]></action>
		</object>

		<object name="pgVersionNumber"
			style="fancyTextHeadGold"
			type="text"
			ghost="true"
			size="43% 24% 43%+282 24%+25"
		>
			<action on="Load"><![CDATA[
				this.caption = "Build: " + buildTime(0) + " " + getLanguageID();
			]]></action>
		</object>

		<!--
		==========================================
		- MAIN MENU - COMPANY LOGO
		==========================================
		-->

		<object name="pgCompanyLogo"
			style="pgButton"
			type="button"
			size="10 91.666666%-30 25.9765% 100%-30"
			sprite="pgCompanyLogo"
			tooltip="These are the guys who made this game. Visit them at http://www.wildfiregames.com/0ad/"
		>
			<action on="Press"><![CDATA[
				btCode = new Array("guiHide('mbMain');");
				messageBox (420, 420, "[icon=iconProduct] A.D. - History Is Yours For The Taking\nby Wildfire Games, 2002-2005\n\nVersion 0.1.2 (PASAP II)\n\n" +
				"This is a confidental pre-release version of the game!\n\nVisit http://www.wildfiregames.com/0ad/ " +
				"to learn more about [icon=iconProduct] A.D., participate in the community and meet the developers.\n\n", "About [icon=iconProduct] A.D.", 2, new Array(), btCode);
			]]></action>
		</object>

		<!--
		==========================================
		- MAIN MENU - EXIT BUTTON
		==========================================
		-->

		<object	name="pgExit"
			style="wheatExit"
			type="button"
			size="100%-18 2 100%-2 18"
			tooltip="Tired of 0 A.D. ? Click here to leave and reenter the real world."
		>
			<action on="Press"><![CDATA[
				btCaptions = new Array("Yes, let me out!", "Nooooo!");
				btCode = new Array("exit();", "");
				messageBox (400, 200, "Do you really want to quit [icon=iconProduct] A.D.? This will cause a sudden return to reality.", "Confirmation", 0, btCaptions, btCode);
			]]></action>
		</object>
	</object>

	<!--
	==========================================
	- MAIN MENU - BACKGROUND MASK
	==========================================
	-->

	<object	name="pgSubWindow"
		type="image"
		z="90"
		hidden="true"
		sprite="bkTranslucent" 
	>

		<!--
		===============================================
		- CAMPAIGNS SCREEN -
		===============================================
		-->

		<object name="pgCampaigns"
			style="wheatWindow"
			type="image"
			hidden="true"
			size="50%-150 50%-120 50%+150 50%+120"
		>
			<object name="pgCampaignsTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>Campaigns
			</object>

			<object name="pgCampaignsExitButton"
				style="wheatExit"
				type="button"
			>
				<action on="Press"><![CDATA[
					closeMainMenuSubWindow ("pgCampaigns");
				]]></action>
			</object>
			
			<!-- Add campaign screen controls here later -->
			
		</object>

		<!--
		===============================================
		- GAME SESSION SETUP SCREEN -
		===============================================
		-->

		<!-- main object; the size of this equals to fullscreen at lowest resolution (800x600) -->
		<object name="pgSessionSetup" 
			style="wheatWindow"
			type="image"
			hidden="true"
			size="50%-400 50%-300 50%+400 50%+300"
		>
			<object name="pgSessionSetupTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>
			</object>

			<object name="pgSessionSetupExitButton"
				style="wheatExit"
				type="button"
				tooltip_style="snToolTip"
			>
				<action on="Press"><![CDATA[
					closeSessionSetup();
				]]></action>
			</object>

				<object name="pgSessionSetupTitle"
					style="wheatTextHeadMaxBlack"
					type="text"
					size="10 5 140 25"
				>Game Setup
				</object>


			<!--
			==========================================
			- MULTIPLAYER OBJECTS
			- Not visible to Skirmish.
			==========================================
			-->

			<object name="pgSessionSetupMP"
				hidden="true"
			>

				<!--
				==========================================
				- HOST OBJECTS
				- Not visible to Skirmish or Client.
				==========================================
				-->

				<object	name="pgSessionSetupMPHost"
					hidden="true"
				>

				<!-- controls for lag bars and player kicking -->
				<object name="pgSessionSetupMPKickP1"
					style="wheatButton"
					type="button"
					size="500 120 520 140"
				>K
					<action on="Press"><![CDATA[
						// Kick player here
					]]></action>
				</object>
				
				</object>

				<!--
				==========================================
				- CLIENT OBJECTS
				- Not visible to Skirmish or Host.
				==========================================
				-->

				<object	name="pgSessionSetupMPClient"
					hidden="true"
				>
				</object>

			</object>

			<!--
			==========================================
			- HOST/SKIRMISH OBJECTS
			- Not visible to Client.
			==========================================
			-->

			<object	name="pgSessionSetupMaster"
				hidden="true"
			>
			</object>

			<!--
			==========================================
			- SKIRMISH OBJECTS
			- Not visible to Host or Client.
			==========================================
			-->

			<object name="pgSessionSetupSkirmish"
				hidden="true"
			>
			</object>

			<!-- 
			If objects are only supposed to be visible in multiplayer, or are only available to hosts,
			please put them in the containers above. 
			-->


			<!--
			==========================================
			- CIV SELECTION CONTROLS
			==========================================
			-->

			<object name="pgSessionSetupGrpCivSel"
				style="wheatBorderBlack"
				type="image"
				size="10 30 33% 50%-25"
			>
				
				<object name="pgSessionSetupCivSelTxt"
					type="text"
					size="5 5 100%-5 20"
				>Your Civilization:
				</object>
				
				<object name="pgSessionSetupCivSel"
					style="wheatBorderBlack"
					type="button"
					size="30 35 100%-30 100%-45"
					sprite="snEmblemHele"
					tooltip_style="pgSessionSetupToolTip"
					tooltip="Click here to change the civilization you would like to play."
				/>
				<object name="pgSessionSetupCivSelName"
					style="wheatTextHeadMaxBlack"
					type="text"
					size="30 100%-35 100%-30 100%-5"
				>Hellenes   (i)
				</object>
				
			</object>
			
			<!--
			==========================================
			- MAP CONTROLS
			==========================================
			-->
			
			<object name="pgSessionSetupGrpMap"
				style="wheatBorderBlack"
				type="image"
				size="10 50%-20 33% 100%-10"
			>
			
				<!-- MAP SELECTION -->
				<object name="pgSessionSetupMapTxt" 
					type="text"
					size="5 5 100%-5 20"
				>Map:
				</object>


				<object name="pgSessionSetupMapTypeTxt" 
					type="text"
					size="5 30 100%-5 55"
				>Type:
				</object>

				<object name="pgSessionSetupMapType"
					style="wheatDropDown"
					type="dropdown"
					size="50 25 100%-5 55"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "Random Map");
						pushItem (this.name, "Real World Map");
						setCurrItemValue (this.name, "Random Map");
					]]></action>
				</object>


				<object name="pgSessionSetupMapNameTxt" 
					type="text"
					size="5 65 100%-5 90"
				>Name:
				</object>

				<object name="pgSessionSetupMapName"
					style="wheatDropDown"
					type="dropdown"
					size="50 60 100%-5 90"
				>
					<action on="Load"><![CDATA[
						// Note: We should set this in a .cfg or initialisation area, as it's used again later.
						mapPath = "maps/scenarios/"
	
						// Get a list of map names.
						mapArray = buildFileList (mapPath, "*.pmp", false);

						// Alphabetically sort the list.
						mapArray.sort();
						
						for (mapIndex = 0; mapIndex < mapArray.length; mapIndex++)
						{
							// Remove the path and extension from each name, since we just want the filename.
							// (Is there an equivalent "basename" function for that in JS?)
							mapArray[mapIndex] = mapArray[mapIndex].substring (mapPath.length, mapArray[mapIndex].length-4)

							// Add map name to the end of the object's list.
							pushItem (this.name, mapArray[mapIndex]);
						}
	
						// Set default value (pick whatever's at the top of the list).
//						getGUIObjectByName(this.name).selected = 0;
						// No, on second thought, set it to the randomly generated map until we can remember the last choice.
						setCurrItemValue (this.name, "cantabrian_generated");
					]]></action>
				</object>


				<object name="pgSessionSetupMapFoWTxt" 
					type="text"
					size="5 100 110 120"
				>Fog of War:
				</object>

				<object name="pgSessionSetupMapFoWCheck"
					style="wheatCrossBox"
					type="checkbox"
					size="120 100 140 120"
					checked="true"
				/>

				<!--
				- LINE OF SIGHT
				-->

				<object name="pgSessionSetupLosLabel" 
					type="text"
					style="wheatTextLabelBlack"
					size="5 130 110 155"
				>LOS:
				</object>
			
				<object	name="pgSessionSetupLosSetting"
					style="wheatDropDown"
					type="dropdown"
					size="115 125 100%-5 155"
				>
					<item>Normal</item>
					<item>Explored</item>
					<item>All Visible</item>

					<action on="Load"><![CDATA[
						getGUIObjectByName("pgSessionSetupLosSetting").selected = 2;
				]]></action>
				</object>
				
<!--				<object name="pgSessionSetupMapRevealTxt" 
					type="text"
					size="5 135 110 155"
				>Reveal Map:
				</object>

				<object name="pgSessionSetupMapRevealCheck"
					style="wheatCrossBox"
					type="checkbox"
					size="120 135 140 155"
				/>-->


				<object name="pgSessionSetupMapSizeTxt" 
					type="text"
					size="5 165 110 180"
				>Map Size:
				</object>

				<object name="pgSessionSetupMapSize"
					style="wheatDropDown"
					type="dropdown"
					size="115 160 100%-5 190"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "Tiny");
						pushItem (this.name, "Small");
						pushItem (this.name, "Medium");
						pushItem (this.name, "Large");
						pushItem (this.name, "Very Large");
						setCurrItemValue (this.name, "Large");
					]]></action>
				</object>
				
				<object name="pgSessionSetupMapLine1"
					style="wheatBorderBlack"
					type="image"
					size="5 200 100%-5 200"
				/>
				
				<object name="pgSessionSetupMapInfo"
					style="wheatBorderBlack"
					type="text"
					size="5 210 100%-5 100%-35"
				>
				Map Info
Developed by, well, WFG.
A large landmass with rivers, forests and coastal fishing grounds.
				</object>
				
				<object name="pgSessionSetupMoreMaps"
					style="wheatButton"
					type="button"
					size="100%-135 100%-30 100%-5 100%-5"
				>
				Get more maps
				</object>

			</object>

			<object name="pgSessionSetupTempSq3"
				style="wheatBorderBlack"
				type="image"
				size="33%+10 45 100%-10 50%+20"
			>
			
				<!--
				==========================================
				- MAIN MENU - PLAYER SLOTS
				==========================================
				-->

				<object name="pgSessionSetupPlayerHead"
					type="text"
					size="5 5 100%-5 20"
				>Other Players:
				</object>

				<object name="pgSessionSetupP1"
					style="wheatBorderBlack"
					type="button"
					enabled="false"
					size="5 30 205 60"
					text_align="left"
				/>

				<object name="pgSessionSetupP2"
					style="wheatDropDown"
					type="dropdown"
					size="5 65 205 100"
				/>

				<object name="pgSessionSetupP3"
					style="wheatDropDown"
					type="dropdown"
					size="5 105 205 140"
				/>

				<object name="pgSessionSetupP4"
					style="wheatDropDown"
					type="dropdown"
					size="5 145 205 180"
				/>

				<object name="pgSessionSetupP5"
					style="wheatDropDown"
					type="dropdown"
					size="5 185 205 220"
				/>

				<object name="pgSessionSetupP6"
					style="wheatDropDown"
					type="dropdown"
					size="5 225 205 260"
				/>

<!-- Players 7 & 8 disabled for now due to spacing issues -->

				<object name="pgSessionSetupP7"
					enabled="false"
					hidden="true"
					style="wheatDropDown"
					type="dropdown"
					size="5 265 205 300"
				/>

				<object name="pgSessionSetupP8"
					enabled="false"
					hidden="true"
					style="wheatDropDown"
					type="dropdown"
					size="5 305 205 340"
				/>
			
			</object>

			<!--
			==========================================
			- GAME SETTINGS
			==========================================
			-->

			<object name="pgSessionSetupGrpGameSettings"
				style="wheatBorderBlack"
				type="image"
				size="33%+10 50%+30 67%-5 100%-10"
			>


				<object name="pgSessionSetupGameModeTxt"
					type="text"
					size="5 10 100 35"
				>Game Mode:
				</object>

				<object name="pgSessionSetupGameMode"
					style="wheatDropDown"
					type="dropdown"
					size="110 5 100%-10 35"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "Conquest");
						pushItem (this.name, "Score");
						setCurrItemValue (this.name, "Conquest");
					]]></action>
				</object>


				<object name="pgSessionSetupStartPhaseTxt"
					type="text"
					size="5 45 110 70"
				>Starting Phase:
				</object>

				<object name="pgSessionSetupStartPhase"
					style="wheatDropDown"
					type="dropdown"
					size="110 40 100%-10 70"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "Village");
						pushItem (this.name, "Town");
						pushItem (this.name, "City");
						setCurrItemValue (this.name, "Village");
					]]></action>
				</object>


				<object name="pgSessionSetupResourcesTxt"
					type="text"
					size="5 80 110 105"
				>Resources:
				</object>

				<object name="pgSessionSetupResources"
					style="wheatDropDown"
					type="dropdown"
					size="110 75 100%-10 105"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "Low");
						pushItem (this.name, "Normal");
						pushItem (this.name, "High");
						setCurrItemValue (this.name, "High");
					]]></action>
				</object>


				<object name="pgSessionSetupSettingsLine1"
					style="wheatBorderBlack"
					type="image"
					size="5 115 100%-5 115"
				/>


			</object>

			<!--
			==========================================
			- HELP AND INFO OBJECTS
			==========================================
			-->

			<object name="pgSessionSetupGrpHelpInfo"
				style="wheatBorderBlack"
				type="image"
				size="67%+5 50%+30 100%-10 100%-50"
			>
				<object name="pgSessionSetupInfoTxt"
					type="text"
					size="10 10 100%-10 50%-10"
				>This is info text.
				</object>
				
				<object name="pgSessionSetupToolTip"
					style="fancyTextHeadWhite"
					type="text"
					hidden="true"
					sprite="bkTranslucent"
					size="10 50%-5 100%-10 100%-10"
				>tooltipText
				</object>
				
			</object>


			<!--
			==========================================
			- GAME SETUP - BUTTONS
			==========================================
			-->

			<object name="pgSessionSetupStartButton" 
				style="wheatButton"
				type="button"
				size="83%-125 100%-40 83%-25 100%-10" 
				tooltip_style="pgSessionSetupToolTip"
				tooltip="Click this button to start a new game with the current settings."
			>Start!
				<action on="Press"><![CDATA[
						startMap (
							getCurrItemValue("pgSessionSetupMapName"),
							getGUIObjectByName("pgSessionSetupLosSetting").selected,
							"pgSessionSetup");
				]]></action>
			</object>

			<object name="pgSessionSetupCancelButton"
				style="wheatButton"
				type="button"
				size="83%+25 100%-40 83%+125 100%-10"
				tooltip_style="pgSessionSetupToolTip"
				tooltip="Use this button if you are a coward and you don't dare to face the challenge of this game."
			>Cancel
				<action on="Press"><![CDATA[
					closeSessionSetup();
				]]></action>
			</object>
		</object>

		<!--
		===============================================
		- MULTIPLAYER MODE SELECTION SCREEN -
		===============================================
		-->

		<object name="pgMPModeSel"
			style="wheatWindow"
			type="text"
			hidden="true"
			size="50%-200 50%-90 50%+200 50%+90"
		>Please select whether you want to join a game or host your own game. 
			<object name="pgMPModeSelTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>Multiplayer
			</object>

			<object name="pgMPModeSelExitButton"
				style="wheatExit"
				type="button"
			>
				<action on="Press"><![CDATA[
					closeMainMenuSubWindow ("pgMPModeSel");
				]]></action>
			</object>

			<!--
			==========================================
			- MAIN MENU - HOST / JOIN CONTROLS
			==========================================
			-->

			<object name="pgMPModeSelHostJoinTxt"
				style="wheatTextHeadBlack"
				type="text"
				size="0 100%-70 200 199%-40"
			>Game Mode
			</object>

			<object name="pgMPModeSelJoinButton"
				style="wheatButton"
				type="button"
				size="130 100%-70 230 100%-40" 
			>Join Game
				<action on="Press"><![CDATA[
					// rudimentary client connection code; finally working now :)
					guiSwitch ("pgMPModeSel", "pgMPJoin");
				]]></action>
			</object>
                              
			<!-- (need code for the game start procedure here) -->

			<object name="pgMPModeSelHostButton"
				style="wheatButton"
				type="button"
				size="250 100%-70 350 100%-40" 
			>Host Game
				<action on="Press"><![CDATA[
					guiSwitch ("pgMPModeSel", "pgMPHost");
				]]></action>
			</object>

		</object>

		<!--
		===============================================
		- MULTIPLAYER HOST GAME SCREEN -
		===============================================
		-->

		<object name="pgMPHost" 
			style="wheatWindow"
			type="image"
			hidden="true"
			size="50%-190 50%-120 50%+190 50%+120"
		>
			<object name="pgMPHostTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>Host a game
			</object>

			<object name="pgMPHostExitButton"
				style="wheatExit"
				type="button"
			>
				<action on="Press"><![CDATA[
					closeMainMenuSubWindow ("pgMPHost");
				]]></action>
			</object>

			<!--
			==========================================
			- MAIN MENU - SERVER/GAME NAME CONTROLS
			==========================================
			-->

			<object	name="pgMPHostTxt1"
				type="text"
				size="0 0 400 30"
			>Setting up your server.
			</object>

			<object name="pgMPHostGameNameTxt"
				style="wheatTextHeadBlack"
				type="text"
				size="0 40 200 60"
			>Game (Server) Name:
			</object>

			<object name="pgMPHostGameName"
				style="wheatBorderBlack"
				type="input"
				size="220 40 370 60"
			>My Game
			</object>

			<!--
			==========================================
			- MAIN MENU - WELCOME MESSAGE CONTROLS
			==========================================
			-->

			<object name="pgMPHostWelcomeMsgTxt" 
				style="wheatTextHeadBlack"
				type="text"
				size="0 70 200 90"
			>Welcome Message:
			</object>

			<object name="pgMPHostTxt2"
				type="text"
				size="0 100 370 180"
			>You can enter some message which is displayed to new players upon joining here.
			</object>

			<object name="pgMPHostWelcomeMsg" 
				style="wheatBorderBlackNote"
				type="input"
				size="5 150 370 180"
			>Uhm, welcome to my game. Have fun!
			</object>

			<!--
			==========================================
			- MAIN MENU - CONTINUE / BACK CONTROLS
			==========================================
			-->

			<object name="pgMPHostContinueButton"
				style="wheatButton"
				type="button"
				size="50%-125 200 50%-25 230"
			>Continue
				<action on="Press"><![CDATA[
					initMPHost ("pgMPHost",
						getGUIObjectByName ("pgMPHostGameName").caption,
						getGUIObjectByName ("pgMPHostWelcomeMsg").caption,
						getCurrItemValue ("pgProfileName"));
				]]></action>
			</object>

			<object name="pgMPHostBackButton"
				style="wheatButton"
				type="button"
				size="50%+25 200 50%+125 230"
			>Back
				<action on="Press"><![CDATA[
					guiSwitch ("pgMPHost", "pgMPModeSel");
				]]></action>
			</object>
		</object>

		<!--
		===============================================
		- MULTIPLAYER JOIN GAME SCREEN -
		===============================================
		-->

		<object name="pgMPJoin" 
			style="wheatWindow"
			type="image"
			hidden="true"
			size="50%-190 50%-120 50%+190 50%+120"
		>
			<object name="pgMPJoinTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>Join a game
			</object>

			<object name="pgMPJoinExitButton"
				style="wheatExit"
				type="button"
			>
				<action on="Press"><![CDATA[
					closeMainMenuSubWindow ("pgMPJoin");
				]]></action>
			</object>

			<!--
			==========================================
			- MAIN MENU - SERVER NAME / IP CONTROLS
			==========================================
			-->

			<object name="pgMPJoinTxt1"
				type="text"
				size="0 0 400 30"
			>Joining an existing game.
			</object>

			<object name="pgMPJoinServerIPTxt" 
				style="wheatTextHeadBlack"
				type="text"
				size="0 40 200 60"
			>Server Hostname or IP:
			</object>

			<object name="pgMPJoinServerIP" 
				style="wheatBorderBlack"
				type="input"
				size="220 40 370 60"
			>127.0.0.1
			</object>

			<!--
			==========================================
			- MAIN MENU - CONTINUE / BACK CONTROLS
			==========================================
			-->

			<object name="pgMPJoinSetupButton"
				style="wheatButton"
				type="button"
				size="50%-125 200 50%-25 230"
			>Continue
				<action on="Press"><![CDATA[
					initMPClient ("pgMPJoin", 
						getGUIObjectByName ("pgMPJoinServerIP").caption,
						getCurrItemValue ("pgProfileName"));
				]]></action>
			</object>

			<object name="pgMPJoinBackButton"
				style="wheatButton"
				type="button"
				size="50%+25 200 50%+125 230"
			>Back
				<action on="Press"><![CDATA[
					guiSwitch ("pgMPJoin", "pgMPModeSel");
				]]></action>
			</object>
		</object>

		<!--
		===============================================
		- OPTIONS SCREEN -
		===============================================
		-->

		<object name="pgOptions"
			style="wheatWindow"
			type="image"
			hidden="true"
			size="50%-400 50%-300 50%+400 50%+300"
		>
			<object name="pgOptionsTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>Options
			</object>

			<object name="pgOptionsExitButton"
				style="wheatExit"
				type="button"
			>
				<action on="Press"><![CDATA[
					// Close Options Screen, abandoning all changes.
					closeMainMenuSubWindow ("pgOptions");
				]]></action>
			</object>

			<!--
			===============================================
			- OPTIONS SCREEN - AUDIO
			===============================================
			-->

			<object name="pgOptionsAudioWindow"
				style="wheatBorderBlack"
				type="image"
				size="1% 4% 99% 90%"
			>
				<object name="pgOptionsAudioSoundCheckBox"
					style="wheatCrossBox"
					type="checkbox"
					hotkey="audio.toggle"
					size="50%-50 20% 50%+50 25%"
				>Mute All
					<action on="Load"><![CDATA[
						// (Would like to set checkbox state to value of snd_disabled, but looks
						// like that variable isn't exposed until after the GUI is loaded.
					]]></action>
					<action on="Press"><![CDATA[
						// Clicking the checkbox turns sound on and off.
						// (Or at least it should, but it doesn't. Checkbox text doesn't appear
						// either. Maybe this control isn't finished yet?)
						if(this.checked)
						{
							curr_music.setGain (0.0);
							g_ConfigDB.system["sound.mastergain"] = 0.0;
						}
						if(!this.checked)
						{
							curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
							g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
						}
					]]></action>	
				</object>

				<!--
				===============================================
				- AUDIO SCREEN - Music
				===============================================
				-->

				<object name="pgOptionsAudioMusicGainTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 30% 50%+20 35%"
					text_align="left"
					text_valign="center"
				>Music Volume
					<action on="Load"><![CDATA[
						this.caption = "Music Volume";
					]]></action>
				</object>


				<object name="pgOptionsAudioMusicGain"
					style="wheatBorderBlack"
					type="text"
					size="50%-20 30% 50%+20 35%"
					text_align="center"
					text_valign="center"
				>
					<action on="Load"><![CDATA[
						this.caption = g_ConfigDB.system["sound.mastergain"];
					]]></action>
				</object>

				<object name="pgOptionsAudioMusicGainDec"
					style="wheatArrowLeft"
					type="button"
					size="50%-40 30% 50%-25 35%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioMusicGain").caption > 0.0)
							guiModifyCaption ("pgOptionsAudioMusicGain", -.1, 1);

						curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
						g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
					]]></action>
				</object>

				<object name="pgOptionsAudioMusicGainInc"
					style="wheatArrowRight"
					type="button"
					size="50%+25 30% 50%+40 35%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioMusicGain").caption < 1.0)
							guiModifyCaption ("pgOptionsAudioMusicGain", .1, 1);

						curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
						g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
					]]></action>
				</object>

				<object name="pgOptionsAudioMusicCheckBox"
					style="wheatCrossBox"
					type="checkbox"
					size="60% 30% 60%+50 35%"
				>Mute
					<action on="Press"><![CDATA[
						// Clicking the checkbox turns music on and off.

						if(this.checked)
						{
							curr_music.setGain (0.0);
							g_ConfigDB.system["sound.mastergain"] = 0.0;
						}
						if(!this.checked)
						{
							curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
							g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
						}
					]]></action>	
				</object>

				<!--
				===============================================
				- AUDIO SCREEN - Sound
				===============================================
				-->

				<object name="pgOptionsAudioSoundGainTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 40% 50%+20 45%"
					text_align="left"
					text_valign="center"
				>Sound Volume
					<action on="Load"><![CDATA[
						this.caption = "Sound Volume";
					]]></action>
				</object>


				<object name="pgOptionsAudioSoundGain"
					style="wheatBorderBlack"
					type="text"
					size="50%-20 40% 50%+20 45%"
					text_align="center"
					text_valign="center"
				>
					<action on="Load"><![CDATA[
						this.caption = "0";
					]]></action>
				</object>

				<object name="pgOptionsAudioSoundGainDec"
					style="wheatArrowLeft"
					type="button"
					size="50%-40 40% 50%-25 45%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioSoundGain").caption > 0.0)
							guiModifyCaption ("pgOptionsAudioSoundGain", -.1, 1);
					]]></action>
				</object>

				<object name="pgOptionsAudioSoundGainInc"
					style="wheatArrowRight"
					type="button"
					size="50%+25 40% 50%+40 45%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioSoundGain").caption < 1.0)
							guiModifyCaption ("pgOptionsAudioSoundGain", .1, 1);
					]]></action>
				</object>


				<object name="pgOptionsAudioSndCheckBox"
					style="wheatCrossBox"
					type="checkbox"
					size="60% 40% 60%+50 45%"
				>Mute

					<action on="Press"><![CDATA[
						// Clicking the checkbox turns sound on and off.

						if(this.checked)
						{
//							curr_music.setGain (0.0);
//							g_ConfigDB.system["sound.mastergain"] = 0.0;
						}
						if(!this.checked)
						{
//							curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
//							g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
						}
					]]></action>	
				</object>

				<!--
				===============================================
				- AUDIO SCREEN - Ambient
				===============================================
				-->

				<object name="pgOptionsAudioAmbientGainTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 50% 50%+20 55%"
					text_align="left"
					text_valign="center"
				>Ambient Volume
					<action on="Load"><![CDATA[
						this.caption = "Ambient Volume";
					]]></action>
				</object>


				<object name="pgOptionsAudioAmbientGain"
					style="wheatBorderBlack"
					type="text"
					size="50%-20 50% 50%+20 55%"
					text_align="center"
					text_valign="center"
				>
					<action on="Load"><![CDATA[
						this.caption = "0";
					]]></action>
				</object>

				<object name="pgOptionsAudioAmbientGainDec"
					style="wheatArrowLeft"
					type="button"
					size="50%-40 50% 50%-25 55%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioAmbientGain").caption > 0.0)
							guiModifyCaption ("pgOptionsAudioAmbientGain", -.1, 1);
					]]></action>
				</object>

				<object name="pgOptionsAudioAmbientGainInc"
					style="wheatArrowRight"
					type="button"
					size="50%+25 50% 50%+40 55%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioAmbientGain").caption < 1.0)
							guiModifyCaption ("pgOptionsAudioAmbientGain", .1, 1);
					]]></action>
				</object>


				<object name="pgOptionsAudioAmbientCheckBox"
					style="wheatCrossBox"
					type="checkbox"
					size="60% 50% 60%+50 55%"
				>Mute

					<action on="Press"><![CDATA[
						// Clicking the checkbox turns ambient sound on and off.

						if(this.checked)
						{
//							curr_music.setGain (0.0);
//							g_ConfigDB.system["sound.mastergain"] = 0.0;
						}
						if(!this.checked)
						{
//							curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
//							g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
						}
					]]></action>	
				</object>

				<!--
				===============================================
				- AUDIO SCREEN - Voice
				===============================================
				-->

				<object name="pgOptionsAudioVoiceGainTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 60% 50%+20 65%"
					text_align="left"
					text_valign="center"
				>Voice Volume
					<action on="Load"><![CDATA[
						this.caption = "Voice Volume";
					]]></action>
				</object>


				<object name="pgOptionsAudioVoiceGain"
					style="wheatBorderBlack"
					type="text"
					size="50%-20 60% 50%+20 65%"
					text_align="center"
					text_valign="center"
				>
					<action on="Load"><![CDATA[
						this.caption = "0";
					]]></action>
				</object>

				<object name="pgOptionsAudioVoiceGainDec"
					style="wheatArrowLeft"
					type="button"
					size="50%-40 60% 50%-25 65%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioVoiceGain").caption > 0.0)
							guiModifyCaption ("pgOptionsAudioVoiceGain", -.1, 1);
					]]></action>
				</object>

				<object name="pgOptionsAudioVoiceGainInc"
					style="wheatArrowRight"
					type="button"
					size="50%+25 60% 50%+40 65%"
				>
					<action on="Press"><![CDATA[
						if (getGUIObjectByName ("pgOptionsAudioVoiceGain").caption < 1.0)
							guiModifyCaption ("pgOptionsAudioVoiceGain", .1, 1);
					]]></action>
				</object>

				<object name="pgOptionsAudioVoiceCheckBox"
					style="wheatCrossBox"
					type="checkbox"
					size="60% 60% 60%+50 65%"
				>Mute

					<action on="Press"><![CDATA[
						// Clicking the checkbox turns voice sound on and off.

						if(this.checked)
						{
//							curr_music.setGain (0.0);
//							g_ConfigDB.system["sound.mastergain"] = 0.0;
						}
						if(!this.checked)
						{
//							curr_music.setGain (getGUIObjectByName ("pgOptionsAudioMusicGain").caption);
//							g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
						}
					]]></action>	
				</object>

			</object>

			<!--
			===============================================
			- OPTIONS SCREEN - VIDEO
			===============================================
			-->

			<object name="pgOptionsVideoWindow"
				style="wheatBorderBlack"
				type="image"
				hidden="true"
				size="1% 4% 99% 90%"
			>


				<!--
				===============================================
				- VIDEO SCREEN - Resolution
				===============================================
				-->


				<object name="pgOptionsVideoResolutionTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 10% 50%+20 15%"
					text_align="left"
					text_valign="center"
				>Resolution
					<action on="Load"><![CDATA[
						this.caption = "Resolution";
					]]></action>
				</object>

				<object name="pgOptionsVideoResolution"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 10% 70% 15%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "800x600");
						pushItem (this.name, "1024x768");
						pushItem (this.name, "1280x768");
						pushItem (this.name, "1280x800");
						pushItem (this.name, "1600x1200");
						setCurrItemValue (this.name, "1024x768");
					]]></action>
				</object>


				<!--
				===============================================
				- VIDEO SCREEN - Detail
				===============================================
				-->


				<object name="pgOptionsVideoDetailTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 19% 50%+20 24%"
					text_align="left"
					text_valign="center"
				>Model Detail
					<action on="Load"><![CDATA[
						this.caption = "Model Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoDetail"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 19% 70% 24%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Texture
				===============================================
				-->

				<object name="pgOptionsVideoTextureTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 28% 50%+20 33%"
					text_align="left"
					text_valign="center"
				>Texture Detail
					<action on="Load"><![CDATA[
						this.caption = "Texture Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoTexture"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 28% 70% 33%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Animation
				===============================================
				-->

				<object name="pgOptionsVideoAnimationTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 37% 50%+20 42%"
					text_align="left"
					text_valign="center"
				>Animation Detail
					<action on="Load"><![CDATA[
						this.caption = "Animation Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoAnimation"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 37% 70% 42%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Effects
				===============================================
				-->

				<object name="pgOptionsVideoEffectsTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 46% 50%+20 51%"
					text_align="left"
					text_valign="center"
				>Effects Detail
					<action on="Load"><![CDATA[
						this.caption = "Effects Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoEffects"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 46% 70% 51%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Weather
				===============================================
				-->

				<object name="pgOptionsVideoWeatherTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 55% 50%+20 60%"
					text_align="left"
					text_valign="center"
				>Weather Detail
					<action on="Load"><![CDATA[
						this.caption = "Weather Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoWeather"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 55% 70% 60%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Water
				===============================================
				-->

				<object name="pgOptionsVideoWaterTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 64% 50%+20 69%"
					text_align="left"
					text_valign="center"
				>Water Detail
					<action on="Load"><![CDATA[
						this.caption = "Water Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoWater"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 64% 70% 69%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Terrain
				===============================================
				-->

				<object name="pgOptionsVideoWaterTerrain"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 73% 50%+20 78%"
					text_align="left"
					text_valign="center"
				>Terrain Detail
					<action on="Load"><![CDATA[
						this.caption = "Terrain Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoTerrain"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 73% 70% 78%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Shadow
				===============================================
				-->

				<object name="pgOptionsVideoShadowTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 82% 50%+20 87%"
					text_align="left"
					text_valign="center"
				>Shadow Detail
					<action on="Load"><![CDATA[
						this.caption = "Shadow Detail";
					]]></action>
				</object>

				<object name="pgOptionsVideoShadow"
					style="wheatDropDown"
					type="dropdown"
					size="50%-20 82% 70% 87%"
				>
					<action on="Load"><![CDATA[
						pushItem (this.name, "LOW");
						pushItem (this.name, "MEDIUM");
						pushItem (this.name, "HIGH");
						pushItem (this.name, "PICTURE");
						setCurrItemValue (this.name, "HIGH");
					]]></action>
				</object>

				<!--
				===============================================
				- VIDEO SCREEN - Show Blood
				===============================================
				-->

				<object name="pgOptionsVideoBloodTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 91% 50%+20 96%"
					text_align="left"
					text_valign="center"
				>Show Blood
					<action on="Load"><![CDATA[
						this.caption = "Show Blood";
					]]></action>
				</object>

				<object name="pgOptionsVideoBloodCheckBox"
					style="wheatCrossBox"
					type="checkbox"
					size="50%-20 91% 50%+30 96%"
				>
				</object>


				<!--
				===============================================
				- VIDEO SCREEN - System Information
				===============================================
				-->

				<object name="pgOptionsVideoSystemInfoButton"
					style="wheatButton"
					type="button"
					size="80% 91% 99% 99%"
					tooltip="Display System Information."
					tooltip_style="pgFloatingToolTip"				
				>System Info
					<action on="Press"><![CDATA[
						// Display System Information.
					]]></action>
				</object>

			</object>
			
			<!--
			===============================================
			- OPTIONS SCREEN - GAME
			===============================================
			-->

			<object name="pgOptionsGameWindow"
				style="wheatBorderBlack"
				type="image"
				hidden="true"
				size="1% 4% 99% 90%"
			>

				<!--
				===============================================
				- GAME SCREEN - Mouse Settings
				===============================================
				-->

				<object name="pgOptionsGameMouseTitle"
					style="wheatTextLabelBlack"
					type="text"
					size="50%-180 20% 50%+20 25%"
					text_align="left"
					text_valign="center"
				>Mouse Settings
					<action on="Load"><![CDATA[
						this.caption = "Mouse Settings";
					]]></action>
				</object>

				<object name="pgOptionsGameReverseButtons"
					style="wheatCrossBox"
					type="checkbox"
					size="50%-170 27% 50%+50 32%"
				>Reverse Buttons
					<action on="Load"><![CDATA[
						// TODO: Reverse Mouse Buttons
						this.caption = "Reverse Buttons";
					]]></action>
					<action on="Press"><![CDATA[
						// Clicking the checkbox reverses the buttons
					]]></action>	
				</object>

			</object>

			<!--
			===============================================
			- OPTIONS SCREEN - TAB BUTTONS
			===============================================
			-->

			<object name="pgOptionsAudioButton"
				style="wheatButton"
				type="button"
				enabled="false"
				size="1% 1% 30% 7%"
			>Audio
				<action on="Press"><![CDATA[
					// Open Audio tab.
					openOptionsTab ("pgOptionsAudio");
				]]></action>
			</object>

			<object name="pgOptionsVideoButton"
				style="wheatButton"
				type="button"
				size="35% 1% 65% 7%"
			>Video
				<action on="Press"><![CDATA[
					// Open Video tab.

					openOptionsTab ("pgOptionsVideo");
				]]></action>
			</object>

			<object name="pgOptionsGameButton"
				style="wheatButton"
				type="button"
				size="70% 1% 99% 7%"
			>Game
				<action on="Press"><![CDATA[
					// Open Game tab.

					openOptionsTab ("pgOptionsGame");
				]]></action>
			</object>
			
			<!--
			===============================================
			- OPTIONS SCREEN - OK BUTTON
			===============================================
			-->

			<object name="pgOptionsOKButton"
				style="wheatButton"
				type="button"
				size="10% 92% 40% 100%"
				tooltip="Save all changes and close the Options Screen."
				tooltip_style="pgFloatingToolTip"
			>OK
				<action on="Press"><![CDATA[
					// Save changes.
					// TODO:
//			console.write ("Volume: " + g_ConfigDB.system["sound.mastergain"] + ".")
			writeLog ("C:\Dev-Cpp\Config\Config.exe")
					// Close options screen.
					closeMainMenuSubWindow ("pgOptions");
				]]></action>
			</object>

			<!--
			===============================================
			- OPTIONS SCREEN - CANCEL BUTTON
			===============================================
			-->

			<object name="pgOptionsCancelButton"
				style="wheatButton"
				type="button"
				size="60% 92% 90% 100%"
				tooltip="Close Options Screen, abandoning all changes."
				tooltip_style="pgFloatingToolTip"				
			>Cancel
				<action on="Press"><![CDATA[
					// Close Options Screen, abandoning all changes.				
					closeMainMenuSubWindow ("pgOptions");
				]]></action>
			</object>
			
		</object>						

		<!--
		===============================================
		- HISTORY SCREEN -
		===============================================
		-->

		<object name="pgHistory"
			style="wheatWindow"
			type="image"
			hidden="true"
			size="50%-150 50%-120 50%+150 50%+120"
		>
			<object name="pgHistoryTitleBar"
				style="wheatWindowTitleBar"
				type="button"
			>History
			</object>

			<object name="pgHistoryExitButton"
				style="wheatExit"
				type="button"
			>
				<action on="Press"><![CDATA[
					closeMainMenuSubWindow ("pgHistory");
				]]></action>
			</object>
		</object>

		<!--
		===============================================
		- CREDITS SCREEN
		===============================================
		-->

		<object name="pgCredits"
			style="fancyTextHeadWhite"
			type="list"
			ghost="false"
			hidden="true"
			size="0 0 100% 100%"
			font="verdana12i"
			text_align="center"
		>
			<action on="SelectionChange"><![CDATA[
				console.write ("Note to self: Ask Gee to create list function to clear (empty) a list.");
			]]></action>
		</object>
		
	</object>
</objects>
