<?xml version="1.0" encoding="utf-8" ?>
<GearsMenu name="XUi_Menu/windows.xml">

	<!-- MainMenu replacement Window-->
	<remove xpath="/windows/window[@name='mainMenu']" />

	<append xpath="/windows">
		<window name="mainMenu" anchor="CenterCenter" pos="0,0" width="1050" height="780" controller="Gears.UI.MainMenu, Gears" cursor_area="true">
			<grid pos="50,130" rows="10" cell_width="400" cell_height="60" repeat_content="false" arrangement="vertical" >
				<mainmenubutton name="btnNewGame" pivot="center" width="400" height="50" caption_key="xuiNewGame" />
				<mainmenubutton name="btnContinueGame" pivot="center" width="400" height="50" caption_key="xuiContinueGame" />
				<mainmenubutton name="btnConnectToServer" pivot="center" width="400" height="50" caption_key="xuiConnectToServer" />
				<mainmenubutton name="btnEditingTools" pivot="center" width="400" height="50" caption_key="xuiEditingTools" />
				<mainmenubutton name="btnMods" pivot="center" width="400" height="50" caption_key="gearsUIModsButton" />
				<mainmenubutton name="btnOptions" pivot="center" width="400" height="50" caption_key="xuiOptions" />
				<mainmenubutton name="btnCredits" pivot="center" width="400" height="50" caption_key="xuiCredits" />
				<mainmenubutton name="btnNews" pivot="center" width="400" height="50" caption_key="xuiMMNews" />
				<rect />
				<mainmenubutton name="btnQuit" pivot="center" width="400" height="50" caption_key="xuiQuit" />
			</grid>
		</window>
	</append>

	<!-- Mod Setting Window-->
	<append xpath="/windows">
		<window name="modsWindow" anchor="CenterCenter" pos="-600,375" width="1185" height="780" controller="Gears.UI.ModsWindow, Gears" cursor_area="true">
			<!-- Header -->
			<panel name="header" pos="0,0" height="43" depth="1" backgroundspritename="ui_game_panel_header" bordercolor="[black]" borderthickness="3" >
				<label style="header.name" name="windowheader" pos="6,-6" width="550" text_key="gearsUIModsWindowHeader" />
			</panel>

			<!-- Mod List -->
			<rect name="modList" pos="0,-50" height="656" width="590" controller="Gears.UI.ModList, Gears" clear_selection_on_open="false" clear_searchtext_on_open="true">
				<sprite depth="8" name="border" sprite="menu_empty3px" color="[black]" type="sliced" fillcenter="false" />
				<sprite depth="0" name="backgroundMain" pos="1,-1" height="654" width="588" sprite="menu_empty3px" color="[mediumGrey]" type="sliced" fillcenter="true" />

				<rect depth="4" name="searchControls" height="44" pos="0,0">
					<sprite depth="8" name="backgroundMain" sprite="menu_empty" color="[black]" type="sliced" fillcenter="false" />

					<sprite depth="4" name="searchIcon" style="icon30px" pos="5,-22" sprite="ui_game_symbol_search" pivot="Left"/>
					<textfield name="searchInput" depth="5" pos="40,-22" width="250" height="30" pivot="Left" search_field="true" />

					<simplebutton name="btnSortList" depth="3" pos="583, -8" pivot="right" width="200" height="30" font_size="24" caption_key="xuiDefaults" visible="true" />
				</rect>

				<scrollbar	name="scrollbarModList" depth="6" pos="583,-349" width="12" height="614" padding="4" foregroundname="handler" backgroundname="background" pivot="center" globalopacitymod="1.8">
					<button name="handler" sprite="gears_scrollbar_handler" pivot="center" hovercolor="[gears_scrollbar_handler_hover]" color="[gears_scrollbar_handler]" defaultcolor="[gears_scrollbar_handler]" hoverscale="1" />
					<button name="background" sprite="gears_scrollbar_background" pivot="center" hovercolor="[gears_scrollbar_background_hover]" color="[gears_scrollbar_background]" defaultcolor="[gears_scrollbar_background]" hoverscale="1" sound_play_on_press_down="[paging_click]" />
				</scrollbar>

				<scrollview name="scrollviewModList" depth="5" pos="0,-44" width="580" height="612" scrollbar="scrollbarModList" reset_position="true" over_scroll="false" scroll_speed="1">
					<grid name="list" rows="{modCount}" cols="1" pos="0,-44" cell_width="580" cell_height="61" repeat_content="true" arrangement="vertical" >
						<Gears_ModList_Entry width="580" height="61" controller="Gears.UI.XUiC_ModListEntry, Gears"/>
					</grid>
				</scrollview>
			</rect>

			<!-- Mod Panel -->
			<rect name="modPanel" pos="595,-50" height="656" width="590" controller="Gears.UI.ModPanel, Gears">
				<sprite depth="0" name="backgroundMain" sprite="menu_empty" color="0,0,0,100" type="sliced" fillcenter="true" />
				<sprite depth="10" name="border" sprite="menu_empty3px" color="[black]" type="sliced" fillcenter="false" globalopacity="true" globalopacitymod="0.9" />

				<rect name="tabsHeader" height="44" depth="0">

					<grid name="tabButtons" pos="3,-2" depth="2" rows="1" cols="2" cell_width="293" cell_height="44" repeat_content="false" arrangement="horizontal">
						<rect controller="Gears.UI.TabButton, Gears">
							<simplebutton name="tabButton" depth="3" pos="-1,0" width="295" height="46" font_size="34" caption_key="xuiBack" bordercolor="[transparent]" defaultcolor="[darkGrey]" selectedsprite="menu_empty" selectedcolor="[mediumGrey]" foregroundlayer="false" />
							<sprite depth="4" sprite="menu_empty2px" pos="292,0" width="2" height="44" color="[black]" type="sliced" />
						</rect>
						<rect controller="Gears.UI.TabButton, Gears">
							<simplebutton name="tabButton" depth="3" pos="-1,0" width="293" height="44" font_size="34" caption_key="xuiBack" bordercolor="[transparent]" defaultcolor="[darkGrey]" selectedsprite="menu_empty" selectedcolor="[mediumGrey]" foregroundlayer="false" />
							<sprite depth="4" name="separatorBottom" sprite="menu_empty2px" pos="-1,-43" width="293" height="2" color="[black]" type="sliced" />
						</rect>
					</grid>
				</rect>

				<rect name="tabsContents" depth="2" pos="0,-46" height="612">
					<sprite depth="0" pos="2,-52" width="586" height="556" name="backgroundMain" sprite="menu_empty" color="[darkGrey]" type="sliced" fillcenter="true" />

					<!-- Mod Info -->
					<rect name="ModInfo" pos="0,0" height="592" width="558" tab_key="gearsUIModsModPanelInfo">
						<!-- Header -->
						<rect name="Header">
							<sprite depth="3" pos="3,-1" width="584" height="52" name="backgroundBanner" sprite="menu_empty" color="[mediumGrey]" type="sliced" fillcenter="true" />
							<label depth="10" name="ModName" pos="16,-8" width="558" height="44" text="{ModName}" font_size="40" justify="center" pivot="topleft" />
						</rect>

						<!-- Banner -->
						<texture name="ModBanner" depth="2" pos="3,-52" width="584" height="127" visible="{HasBanner}" />

						<!-- Info -->
						<rect pos="16,{# HasBanner? -135 : -8}">
							<sprite depth="2" name="separatorBottom" sprite="gears_shadow_gradiant3" pos="-13, -44" height="8" width="584" type="sliced" />

							<label depth="10" name="ModAuthor" pos="0,-56" width="358" height="32" color="255,255,255,128" text="{ModAuthor}" font_size="26" justify="left" pivot="topleft" />
							<label depth="10" name="versionTitle" pos="0,-92" width="280" height="28" text_key="gearsUIModsModVersion" font_size="26" justify="left" pivot="topleft"/>
							<label depth="10" name="ModVersion" pos="0,-124" width="280" height="28" text="{ModVersion}" font_size="24" justify="left" pivot="topleft"/>
							<label depth="10" name="ModDescription" pos="0,-156" height="{# HasBanner? 307 : 434}" text="{ModDescription}" font_size="26" justify="left" pivot="topleft" />
							<simplebutton name="ModWebsite" depth="3" pos="558, -56" width="225" height="44" font_size="34" caption_key="Website" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" selectedcolor="[mediumGrey]" foregroundlayer="false" pivot="right" />
							<simplebutton name="ModFolder" depth="3" pos="558, -106" width="225" height="44" font_size="34" caption_key="Open Folder" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" selectedcolor="[mediumGrey]" foregroundlayer="false" pivot="right" />
						</rect>
					</rect>

					<!-- Mod Settings -->
					<rect name="ModSettings" pos="0,0" height="592" width="590" controller="Gears.UI.ModSettings, Gears" tab_key="gearsUIModsModPanelSettings">

						<!-- Settings Tabs -->
						<sprite name="separatorTop" depth="5" pos="3,1" sprite="menu_empty2px" height="2" width="584" color="[black]" type="sliced" />
						<simplebutton name="backButton" depth="4" pos="3,-1" width="30" height="52" caption="&#9664;" font_size="20" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" foregroundlayer="false"/>
						<sprite name="tabButtonSpacer" depth="8" sprite="menu_empty2px" pos="32,-1" width="2" height="52" color="[black]" type="sliced" />
						<rect name="tabsHeader" height="52" depth="0">
							<grid name="tabButtons" pos="34,-1" depth="2" rows="1" cols="3" cell_width="175" cell_height="52" repeat_content="true" arrangement="horizontal">
								<rect>
									<simplebutton name="tabButton" depth="2" pos="0,0" width="175" height="52" font_size="34" caption_key="Test" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" selectedcolor="[lightGrey]" foregroundlayer="false"/>
									<sprite name="tabButtonSpacer" depth="8" sprite="menu_empty2px" pos="174,0" width="2" height="52" color="[black]" type="sliced"/>
								</rect>
							</grid>
						</rect>
						<simplebutton name="forwardButton" depth="4" pos="588,-1" width="30" height="52" caption="&#9654;" font_size="20" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" foregroundlayer="false" pivot="right"/>
						<sprite depth="5" name="separatorBottom" pos="3,-52" sprite="menu_empty2px" height="2" width="584" color="[black]" type="sliced" />
						<sprite depth="2" name="separatorBottomShadow" sprite="gears_shadow_gradiant3" pos="3, -53" height="8" width="584" type="sliced" />

						<!-- Settings List -->
						<scrollbar	name="scrollbar" depth="6" pos="582,-330" width="12" height="555" padding="4" foregroundname="handler" backgroundname="background" pivot="center" globalopacitymod="1.8">
							<button name="handler" sprite="gears_scrollbar_handler" pivot="center" hovercolor="[gears_scrollbar_handler_hover]" color="[gears_scrollbar_handler]" defaultcolor="[gears_scrollbar_handler]" hoverscale="1" />
							<button name="background" sprite="gears_scrollbar_background" pivot="center" hovercolor="[gears_scrollbar_background_hover]" color="[gears_scrollbar_background]" defaultcolor="[gears_scrollbar_background]" hoverscale="1" sound_play_on_press_down="[paging_click]" />
						</scrollbar>

						<scrollview name="scrollview" depth="5" pos="0,-52" height="555" width="590" scrollbar="scrollbar" reset_position="true" over_scroll="false" scroll_speed="2.5">
							<table name="settingsList" pos="16,0" repeat_content="true" repeat_count="{settingsCount}" arrangement="vertical" padding="0,3">
								<Gears_ModSettings_OptionCombined width="558" height="40" controller="Gears.UI.GlobalSettingsOption, Gears"/>
							</table>
						</scrollview>
					</rect>
				</rect>
			</rect>

			<rect pos="0, -720">
				<simplebutton name="btnBack" depth="3" pos="0, 0" width="200" height="36" font_size="32" caption_key="xuiBack" upper_case="true" />
				<simplebutton name="btnDefaults" depth="3" pos="960, 0" pivot="right" width="200" height="36" font_size="32" caption_key="xuiDefaults" visible="true" upper_case="true" />
				<simplebutton name="btnApply" depth="3" pos="1185, 0" pivot="right" width="200" height="36" font_size="32" caption_key="xuiApply" upper_case="true" />
			</rect>
		</window>
	</append>


	<!-- newContinueGame window tabs replacement-->
	<remove xpath="/windows/window[@name='newContinueGame']/rect[@name='tabs']/rect[@name='tabsHeader']" />

	<insertBefore xpath="/windows/window[@name='newContinueGame']/rect[@name='tabs']/rect[@name='tabsContents']">
		<rect name="Settings" height="39" depth="0">
			<simplebutton name="backButton" depth="4" pos="3,-3" width="30" height="49" caption="&#9664;" font_size="20" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" foregroundlayer="false"/>
			<sprite name="tabButtonSpacer" depth="8" sprite="menu_empty2px" pos="32,-3" width="2" height="49" color="[black]" type="sliced" />
			<rect name="tabsHeader" height="52" depth="0">
				<grid name="tabButtons" pos="34,-3" depth="2" rows="1" cols="3" cell_width="175" cell_height="49" repeat_content="true" arrangement="horizontal">
					<rect>
						<simplebutton name="tabButton" depth="2" pos="0,0" width="175" height="49" font_size="34" caption_key="Test" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" selectedcolor="[lightGrey]" foregroundlayer="false"/>
						<sprite name="tabButtonSpacer" depth="8" sprite="menu_empty2px" pos="174,0" width="2" height="49" color="[black]" type="sliced"/>
					</rect>
				</grid>
			</rect>
			<simplebutton name="forwardButton" depth="4" pos="588,-3" width="30" height="49" caption="&#9654;" font_size="20" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" foregroundlayer="false" pivot="right"/>
			<sprite depth="5" name="separatorBottom" pos="3,-51" sprite="menu_empty" height="2" width="585" color="[black]" type="sliced" />
		</rect>
	</insertBefore>

	<!-- Setting new tab selector controller for newContinueGame tabs-->
	<setattribute xpath="/windows/window[@name='newContinueGame']/rect[@name='tabs']" name="controller">Gears.UI.GameSettingsSelector, Gears</setattribute>

	<!-- World ModSettings tab content-->
	<insertAfter xpath="/windows/window[@name='newContinueGame']/rect[@name='tabs']/rect[@name='tabsContents']/rect[@tab_key='xuiGameSettingsMultiplayer']">
		<rect name="ModSettings" pos="0,-15" height="583" width="584" controller="Gears.UI.WorldSettings, Gears" tab_key="gearsUIModsButton">

			<!-- Settings Tabs -->
			<simplebutton name="backButton" depth="4" pos="3,0" width="30" height="52" caption="&#9664;" font_size="20" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" foregroundlayer="false"/>
			<sprite name="tabButtonSpacer" depth="8" sprite="menu_empty2px" pos="32,0" width="2" height="52" color="[black]" type="sliced" />
			<rect name="tabsHeader" height="52" depth="0">
				<grid name="tabButtons" pos="34,0" depth="2" rows="1" cols="3" cell_width="175" cell_height="52" repeat_content="true" arrangement="horizontal">
					<rect>
						<simplebutton name="tabButton" depth="2" pos="0,0" width="175" height="52" font_size="34" caption_key="Test" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" selectedcolor="[lightGrey]" foregroundlayer="false"/>
						<sprite name="tabButtonSpacer" depth="8" sprite="menu_empty2px" pos="174,0" width="2" height="52" color="[black]" type="sliced"/>
					</rect>
				</grid>
			</rect>
			<simplebutton name="forwardButton" depth="4" pos="588,0" width="30" height="52" caption="&#9654;" font_size="20" bordercolor="[transparent]" defaultcolor="[mediumGrey]" selectedsprite="menu_empty" foregroundlayer="false" pivot="right"/>
			<sprite depth="5" name="separatorBottom" pos="3,-51" sprite="menu_empty" height="2" color="[black]" type="sliced" />

			<!-- Settings List -->
			<scrollbar	name="scrollbar" depth="6" pos="582,-323" width="12" height="543" padding="4" foregroundname="handler" backgroundname="background" pivot="center" globalopacitymod="1.8">
				<button name="handler" sprite="gears_scrollbar_handler" pivot="center" hovercolor="[gears_scrollbar_handler_hover]" color="[gears_scrollbar_handler]" defaultcolor="[gears_scrollbar_handler]" hoverscale="1" />
				<button name="background" sprite="gears_scrollbar_background" pivot="center" hovercolor="[gears_scrollbar_background_hover]" color="[gears_scrollbar_background]" defaultcolor="[gears_scrollbar_background]" hoverscale="1" sound_play_on_press_down="[paging_click]" />
			</scrollbar>

			<scrollview name="scrollview" depth="3" pos="0,-54" height="541" width="590" scrollbar="scrollbar" reset_position="true" over_scroll="false" scroll_speed="2.5">

				<grid name="settingsList" rows="{settingsCount}" cols="1" pos="16,0" cell_width="558" cell_height="46" repeat_content="true" arrangement="vertical">
					<Gears_WorldSettings_OptionCombined width="558" height="46" controller="Gears.UI.WorldSettingsOption, Gears"/>
				</grid>
			</scrollview>
		</rect>
	</insertAfter>

</GearsMenu>