﻿<?xml version="1.0" encoding="utf-8" ?>
<GearsMenu name="XUi_Menu/windows.xml">

	<!-- MainMenu replacement Window-->
	<set xpath="/windows/window[@name='mainMenu']/@controller">Gears.UI.MainMenu, Gears</set>

	<insertAfter xpath="/windows/window[@name='mainMenu']/grid/mainmenubutton[@name='btnPlayGame']">
		<mainmenubutton name="btnMods" pivot="center" width="400" height="50" caption_key="gearsUIModsButton" />
	</insertAfter>

	<!-- Mod Setting Window-->
	<append xpath="/windows">
		<window name="modsWindow" width="1800" anchor="top" controller="Gears.UI.ModsWindow, Gears" cursor_area="true">
			<rect name="header" width="1840" height="100">
				<fullscreencollider_new color="0,0,0,250" />
				<menu_paging_header text_key="gearsUIModsWindowHeader" />
			</rect>

			<rect pos="-900,-88" height="1044">

				<sprite name="header_line" pos="0,0" sprite="ui3_borders" depth="1" height="69" color="228,18,21,255" type="slicedinversehorizontal" anchor_left="#cam,0.5,-1848" anchor_right="#cam,0.5,1848"/>

				<rect name="modList" width="480" controller="Gears.UI.ModList, Gears" clear_selection_on_open="false" clear_searchtext_on_open="true">
					<rect name="searchControls" height="74" padding="16,0">
						<captionedtextbox name="searchInput" depth="5" pos="0,0" width="${parentinnerwidth-210}" height="${parentinnerheight}" search_field="true" clear_button="true" />

						<iconbutton name="btnSortList" pos="${parentinnerwidth - 10}, ${-parentinnerheight/2}" depth="5" width="${parentinnerheight}" height="${parentinnerheight}" pivot="right" sprite="ui_game_symbol_sort"/>
					</rect>

					<rect name="modListScrollView" pos="0,-74" anchor_top="#parent,1,0" anchor_bottom="buttons,1,10">
						<Gears_defaultscrollbar anchorview="modListScrollView"/>
						<scrollview name="scrollviewModList" width="${parentinnerwidth-20}" clippingsoftness="0,10" depth="2" anchor_top="#parent,1,0" anchor_bottom="#parent,0,0">
							<grid name="list" cols="1" rows="{%modCount}" cell_height="68" arrangement="horizontal" repeat_content="true">
								<Gears_ModList_Entry controller="Gears.UI.XUiC_ModListEntry, Gears"/>
							</grid>
						</scrollview>
					</rect>

					<sprite name="separator" pos="478,-74" width="2" height="${parentinnerheight - 74}" depth="0" sprite="menu_empty" type="sliced" color="[darkGrey]" fillcenter="false" anchor_top="#parent,1,0" anchor_bottom="buttons,1,10" />
				</rect>

				<rect name="modPanel" pos="480,0" width="${parentinnerwidth-480}" depth="2" controller="Gears.UI.XUiC_ModPanel, Gears">

					<rect name="tabsHeader" pos="0,-5" depth="5" height="52" width="${parentinnerwidth}">
						<Gears_iconbutton name="backButton" depth="4" pos="13,${-parentinnerheight/2 - 5}" width="30" height="42" sprite="ui3_symbol_arrow" flip="Horizontally" pivot="left"/>
						<table name="tabButtons" pos="${parentinnerwidth/2 - 6},-2" depth="2" width="${parentinnerwidth - 80}" cols="5" padding="5,0" reposition_twice="true" cell_alignment="center" pivot="top" hide_inactive="true">
							<Gears_pagingheader_button name="tabButton1" text_key="TestReallyLongTabNameIsHere" tooltip_key="Test"/>
							<Gears_pagingheader_button name="tabButton" text_key="TestReallyLonasdasdasdasdgTabNameIsHere" tooltip_key="Test"/>
							<Gears_pagingheader_button name="tabButton" text_key="TestReallyLongTabNameIsHere" tooltip_key="Test"/>
							<Gears_pagingheader_button name="tabButton" text_key="TestShortName" tooltip_key="Test"/>
							<Gears_pagingheader_button name="tabButton5" text_key="TestReallyLongTabNameIsHere" tooltip_key="Test"/>
						</table>
						<Gears_iconbutton name="forwardButton" depth="4" pos="${parentinnerwidth-13},${-parentinnerheight/2 - 5}" width="30" height="42" sprite="ui3_symbol_arrow" pivot="right"/>
					</rect>

					<rect name="ModSettings" pos="10,-74" width="${parentinnerwidth-575}" controller="Gears.UI.ModSettings, Gears" anchor_top="#parent,1,0" anchor_bottom="buttons,1,10" >
						<Gears_defaultscrollbar anchorview="ModSettings"/>
						<scrollview name="scrollviewSettings" width="${parentinnerwidth-20}" clippingsoftness="0,10" depth="2" anchor_top="#parent,1,0" anchor_bottom="#parent,0,0">
							<table name="settingsList" repeat_content="true" repeat_count="{%settingsCount}" arrangement="vertical" padding="0,0">
								<Gears_ModSettings_OptionCombined_new width="${parentinnerwidth}" baseHeight="55" controller="Gears.UI.GlobalSettingsOption, Gears"/>
							</table>
						</scrollview>
					</rect>

					<sprite name="separator" pos="${parentinnerwidth-559},-74" width="2" depth="0" sprite="menu_empty" type="sliced" color="[darkGrey]" fillcenter="false" anchor_top="#parent,1,0" anchor_bottom="buttons,1,10"/>

					<Gears_mod_description name="modDescription" pos="${parentinnerwidth-560},-74" width="560" height="${parentinnerheight - 74}"/>
					<Gears_setting_description name="settingDescription" pos="${parentinnerwidth-560},-74" width="560" height="${parentinnerheight - 74}"/>
				</rect>
			</rect>

			<options_buttons_gears />
		</window>
	</append>

	<set xpath="/windows/window[@name='newContinueGameSettings']/@controller">Gears.UI.NewContinueGameSettings, Gears</set>

	<insertAfter xpath="/windows/window[@name='newContinueGameSettings']/rect[@name='tabs']/rect[@name='tabsContents']/rect[@tab_key='xuiGameSettingsMultiplayer']">
		<rect name="ModSettings" controller="TabSelectorTab" tab_key="gearsUIModsButton">
			<texture name="UnderConstructionTexture" pos="${parentinnerwidth/2},-10" depth="1" width="400" height="400" pivot="top" texture="@modfolder(Gears)://Textures/UnderConstruction_zombie.png" keepsourceaspectratio="true" sourceaspectratiorespectpivot="true" />

			<rect name="noWorldSettingsWarning" pos="0,${-parentinnerheight+110}" height="32" visible="{% !HasWorldSettingMods}">
				<sprite depth="8" sprite="ui_game_symbol_info_notice" pos="20,0" pivot="center" width="32" height="32" color="228, 18, 21, 255" />
				<label name="caption" pos="40,0" width="520" font_size="30" pivot="left" text_key="gearsUIModsWorldSettingsNoSettings" color="228, 18, 21, 255" />
			</rect>

			<labeledbutton name="btnModSettings" pos="${Round(parentinnerwidth/2,0)-150},${-parentinnerheight+50}" width="300" height="50" caption_key="gearsUIModsWorldSettingsButton" upper_case="true" enabled="{% HasWorldSettingMods}"/>
		</rect>
	</insertAfter>

	<append xpath="/windows">
		<window name="modsWorldSettingsWindow" anchor="Center" depth="10" pos="-900,475" width="1800" height="870" controller="Gears.UI.WorldSettingsWindow, Gears" cursor_area="true" lock_navigation="true">
			<fullscreencollider color="0,0,0,230" />

			<boxshadow color="0,0,0,255" />

			<rect name="header" pos="0,0" height="50" depth="2" padding="8,6,6,6">
				<boxbg backcolor="0,0,0,255" bordersprite="menu_empty2px" bordercolor="228, 18, 21, 255" />
				<label text_key="gearsUIModsWorldSettingsWindowHeader" font_size="38" upper_case="true" justify="left" color="228, 18, 21, 255" />
			</rect>

			<rect name="content" pos="0,-49" height="${parentinnerheight-50}" depth="1" controller="Gears.UI.WorldSettingsPanel, Gears">
				<boxbg backcolor="16,16,16,255" bordersprite="menu_empty2px" bordercolor="64,64,64,255" />

				<rect name="leftPanel" pos="0,0" width="400" height="${parentinnerheight-90}" padding="10">
					<sprite name="border" sprite="menu_empty2px" color="64,64,64,255" type="sliced" fillcenter="false" ignoreparentpadding="true" />
					<texture name="UnderConstructionTexture" pos="${parentinnerwidth/2},${Round(-parentinnerheight/5, 0)}" depth="1" pivot="top" texture="@modfolder(Gears)://Textures/UnderConstruction_zombie.png" keepsourceaspectratio="true" sourceaspectratiorespectpivot="true" />
					<!-- <rect name="presetSelector" controller="SandboxPresetSelector" height="390">
						<texture name="icon" pos="70,0" width="180" height="180" texture="{% icon }" keepsourceaspectratio="true" />
						<rect name="difficulty" pos="250,-74" width="${parentinnerwidth-250}" height="32" visible="{% !userpreset and !custompreset and difficulty &gt; 0 }">
							<sprite sprite="ui_game_symbol_skull" pos="10,${-Round(parentinnerheight/2,0)}" width="${parentinnerheight}" height="${parentinnerheight}" pivot="left" color="228,18,21,255" />
							<label pos="${10+parentinnerheight+5},${-Round(parentinnerheight/2,0)-1}" width="60" height="${parentinnerheight-2}" font_size="${parentinnerheight-2}" pivot="left" color="228,18,21,255" text="{% 'x' + difficulty }" />
						</rect>
						<rect name="combos" pos="0,-200" height="90">
							<combobox name="cbxPresetGroup" type="ComboBoxList`1[SandboxPresetGroupData]" pos="0,0" width="${parentinnerwidth}" height="38" font_size="30" value_wrap="false" localization_prefix="sandboxPresetGroup" border_color="64,64,64,255" />
							<combobox name="cbxPreset" type="ComboBoxList`1[SandboxPresetInfo]" pos="0,-45" width="${parentinnerwidth}" height="38" font_size="30" value_wrap="false" border_color="64,64,64,255" />		
						</rect>
						
						<label name="presetDescription" depth="4" pos="0,-300" height="${parentinnerheight-300}" font_size="28" color="[white]" justify="center" pivot="topleft" text="{% description }" />
					</rect> -->

					<!-- <labeledbutton name="btnCreatePreset" depth="3" pos="0,-400" width="${parentinnerwidth}" height="50" font_size="32" caption_key="xuiSandboxCreatePreset" upper_case="true" />

					<labeledbutton name="btnCopy" depth="3" pos="0,-460" width="${parentinnerwidth}" height="50" font_size="32" caption_key="xuiSandboxDuplicatePreset" upper_case="true" enabled="true" />

					<labeledbutton name="btnDelete" depth="3" pos="0,-520" width="${parentinnerwidth}" height="50" font_size="32" caption_key="xuiSandboxDeletePreset" upper_case="true" enabled="true" />

					<rect name="copyCode" pos="0,-600" height="50">
						<iconbuttonbordered name="btnCopyCode" depth="3" pos="25,-25" width="50" height="50" sprite="ui3_symbol_copy_code" tooltip_key="xuiCopyCode" />
						<styledlabel name="currentCode" pos="55,-2" depth="2" width="${parentinnerwidth-50-5}" height="46" text="Test" font_size="32" overflow="clampcontent" overflow_ellipsis="true" />
					</rect>
					<labeledbutton name="btnPasteCode" depth="3" pos="0,-660" width="${parentinnerwidth}" height="50" font_size="32" caption_key="xuiPasteCode" upper_case="true" /> -->
				</rect>

				<rect name="settings" pos="399,0" width="${parentinnerwidth-400}" height="${parentinnerheight-90}" depth="1" controller="Gears.UI.WorldSettings, Gears">
					<sprite name="border" sprite="menu_empty2px" color="64,64,64,255" type="sliced" fillcenter="false" />
					<sprite name="header_line" pos="0,0" sprite="ui3_borders" depth="1" height="69" color="228,18,21,255" type="slicedinversehorizontal"/>
					<rect name="tabsHeader" pos="0,-5" depth="5" height="52" width="${parentinnerwidth}">
						<Gears_iconbutton name="btnBackSelector" depth="4" pos="13,${-parentinnerheight/2 - 5}" width="30" height="42" sprite="ui3_symbol_arrow" flip="Horizontally" pivot="left"/>
						<table name="tabButtons" pos="${Round(parentinnerwidth/2 - 6,0)},-5" depth="2" width="${parentinnerwidth - 80}" cols="5" padding="5,0" reposition_twice="true" cell_alignment="center" pivot="top" hide_inactive="true">
							<worldsettings_tabbutton name="tabButton1" text_key="TestReallyLongTabNameIsHere" tooltip_key="Test"/>
							<worldsettings_tabbutton name="tabButton" text_key="TestReallyLonasdasdasdasdgTabNameIsHere" tooltip_key="Test"/>
							<worldsettings_tabbutton name="tabButton" text_key="TestReallyLongTabNameIsHere" tooltip_key="Test"/>
							<worldsettings_tabbutton name="tabButton" text_key="TestShortName" tooltip_key="Test"/>
							<worldsettings_tabbutton name="tabButton5" text_key="TestReallyLongTabNameIsHere" tooltip_key="Test"/>
						</table>
						<Gears_iconbutton name="btnForwardSelector" depth="4" pos="${parentinnerwidth-13},${-parentinnerheight/2 - 5}" width="30" height="42" sprite="ui3_symbol_arrow" pivot="right"/>
					</rect>

					<rect name="ModSettings" pos="10,-74" width="${parentinnerwidth-575}" height="${parentinnerheight - 84}">
						<Gears_defaultscrollbar anchorview="ModSettings"/>
						<scrollview name="scrollviewSettings" width="${parentinnerwidth-20}" clippingsoftness="0,10" depth="2" anchor_top="#parent,1,0" anchor_bottom="settings,0,0">
							<grid name="settingsList" cols="1" rows="{%settingsCount}" cell_height="56" arrangement="vertical" repeat_content="true">
								<Gears_WorldSettings_OptionCombined width="${parentinnerwidth}" baseHeight="55" controller="Gears.UI.WorldSettingsOption, Gears"/>
							</grid>
						</scrollview>
					</rect>

					<sprite name="separator" pos="${parentinnerwidth-559},-74" width="2" height="${parentinnerheight - 80}" depth="0" sprite="menu_empty" type="sliced" color="[darkGrey]" fillcenter="false"/>

					<Gears_worldsetting_description name="settingDescription" pos="${parentinnerwidth-560},-74" width="560" height="${parentinnerheight - 74}"/>
				</rect>

				<rect name="buttons" pos="0,${-parentinnerheight+90}" height="90" padding="20">
					<labeledglyphbutton name="btnBack" depth="3" pos="0, 0" width="250" height="50" font_size="32" caption_key="xuiBack" upper_case="true" />

					<labeledbutton name="btnDefault" depth="3" pos="${parentinnerwidth-650},0" width="250" height="50" font_size="32" caption_key="xuiDefaults" enabled="true" upper_case="true" />
					<labeledglyphbutton name="btnSave" depth="3" pos="${parentinnerwidth-250},0" width="250" height="50" font_size="32" caption_key="xuiSave" upper_case="true" enabled="true" action="GUI Apply" />
				</rect>

			</rect>
		</window>
	</append>

</GearsMenu>