<!-- Alchemy.xml -->
<menu name="AlchemyMenu">
	<class> &AlchemyMenu; </class>
	<stackingtype> &no_click_past; </stackingtype>
	<alpha>	0 </alpha>
	<locus> &true; </locus>
	<x> 0 </x>
	<y> 0 </y>
	<menufade> 0.25 </menufade>
	
	<rect name="inv_FocusBox">
<include src="focus_box.xml"/>
		<id> 13 </id>
		<visible> &false; </visible>
		<user15>
			<copy src="parent()" trait="depth" />
			<add> 0.5 </add>
		</user15>
	</rect>
	
	<xbuttonb> <ref src="alchemy_button_exit" trait="clicked"/> </xbuttonb>
	<xbuttonx> <ref src="alchemy_button_create" trait="clicked"/> </xbuttonx>
	
	<!-- BACKGROUND ====================================================================-->
	<image name="alchemy_background">
		<filename>Menus\Alchemy\alchemy.dds </filename>
		<depth> 1 </depth>
		<zoom>-1</zoom>
		<width> 1150 </width>
		<height> 840 </height>
		<x>
			<copy src="screen()" trait="width" />
			<sub src="me()" trait="width" />
			<div> 2 </div>
		</x>
		<y>
			<copy src="screen()" trait="height" />
			<sub src="me()" trait="height" />
			<div> 2 </div>
		</y>
		<locus> &true; </locus>
		<_ingredient_buffer> 12 </_ingredient_buffer>
		
		
		<!-- POTION NAME ============================================================-->
		<rect name="name_background">
			<id>2</id>
			<alpha> 0 </alpha>
			<user10> &false; </user10>
			<locus> &true; </locus>
			<target> &true; </target>
			<depth> 1 </depth>
			<x> 210 </x>
			<y>	152 </y>
			<height> 40 </height>
			<width>736</width>
			
			<xdefault> &false; </xdefault>
			<xdown> <ref src="ingredient_one" trait="mouseover"/> </xdown>
			
			<text name="name_text">
				<id>3</id>
				<depth> 1 </depth>
				<string></string>
				<font> 1 </font>
				<red> 117 </red>
				<green> 59 </green>
				<blue> 33 </blue>
				<alpha> 255 </alpha>
				<wrapwidth> 736 </wrapwidth>
				<x> 8 </x>
				<y>
					<copy src="parent()" trait="height"/>
					<sub src="me()" trait="height"/>
					<div>2</div>
				</y>
			</text>
		</rect>
		
		
		<!-- EQUIPMENT ============================================================-->
		<image name="mortar_icon">
			<id> 4 </id>
			<depth> 1 </depth>
			<filename>  Shared\shared_empty.dds </filename>
			<width> 64 </width>
			<height> 64 </height>
			<x> 348	</x>
			<y> 221 </y>
		</image>
		
		<image name="alembic_icon">
			<id> 5 </id>
			<visible> &false; </visible>
			<depth> 1 </depth>
			<filename> Menus\Shared\shared_empty.dds </filename>
			<width> 64 </width>
			<height> 64 </height>
			<x>
				<copy src="retort_icon" trait="x" />
				<add src="retort_icon" trait="width" />
				<add> 66 </add>
			</x>
			<y>
				<copy src="mortar_icon" trait="y" />
			</y>
		</image>
		
		<image name="calcinator_icon">
			<id> 6 </id>
			<visible> &false; </visible>
			<depth> 1 </depth>
			<filename> Menus\Shared\shared_empty.dds </filename>
			<width> 64 </width>
			<height> 64 </height>
			<x>
				<copy src="alembic_icon" trait="x" />
				<add src="alembic_icon" trait="width" />
				<add> 66 </add>
			</x>
			<y>
				<copy src="mortar_icon" trait="y" />
			</y>
		</image>
		
		<image name="retort_icon">
			<id> 7 </id>
			<visible> &false; </visible>
			<depth> 1 </depth>
			<filename> Menus\Shared\shared_empty.dds </filename>
			<width> 64 </width>
			<height> 64 </height>
			<x>
				<copy src="mortar_icon" trait="x" />
				<add src="mortar_icon" trait="width" />
				<add> 66</add>
			</x>
			<y>
				<copy src="mortar_icon" trait="y" />
			</y>
		</image>
		
		
		
		<!-- INGEREDIENT LABEL ============================================================-->
		<text name="ingredient_label">
			<string> <copy src="strings()" trait="_ingredients"/> </string>
			<alpha>255</alpha>
			<depth>1</depth>
			<font>3</font>
			<red> 117 </red>
			<green> 59 </green>
			<blue> 33 </blue>
			<x>
				<copy src="ingredient_one" trait="x"/>
				<!--add>
					<copy src="ingredient_one" trait="width"/>
					<sub src="me()" trait="width"/>
					<div>2</div>
				</add-->
			</x>
			<y>312</y>
		</text>
		
		
		<!-- INGREDIENT 1 =================================================================-->
		<rect name="ingredient_one">
			<id>8</id>
			<alpha> 0 </alpha>
			<user10> &false; </user10>
			<locus> &true; </locus>
			<target> &true; </target>
			<depth> 1 </depth>
			<x> 210 </x>
			<y> 350 </y>
			<height> 64 </height>
			<width> 380 </width>
			<string> <copy src="strings()" trait="_ingredientone"/> </string> <!-- current value, string -->

			<user0> <copy src="strings()" trait="_addingredient"/> </user0>
			
			<xdefault> &true; </xdefault>
			<xup> <ref src="name_background" trait="mouseover"/> </xup>
			<xdown> <ref src="ingredient_two" trait="mouseover"/> </xdown>
			
			<image name="ingredient_one_icon">
				<depth> 1 </depth>
				<id>18</id>
				<visible> &false; </visible>
				<filename></filename>
				<width> 64 </width>
				<height> 64 </height>
				<x> 7 </x>
				<y> 0 </y>
				<locus>&true;</locus>
				<user0></user0>			<!-- stack count -->
				<text name="ingredient_one_stack_count">
					<depth>1</depth>
					<font>3</font>
					<justify> &right; </justify>
					<string>
						<copy src="parent()" trait="user0"/>
					</string>
					<red> 117 </red>
					<green> 59 </green>
					<blue> 33 </blue>
					<alpha>255</alpha>
					<x> 72 </x>
					<y> 46 </y>
				</text>
			</image>
			<text name="ingredient_one_text">
				<depth> 1 </depth>
				<string>
					<copy src="parent()" trait="user0" />
				</string>
				<red> 117 </red>
				<green> 59 </green>
				<blue> 33 </blue>
				<alpha> 255 </alpha>
				<wrapwidth>
					<copy src="parent()" trait="width"/>
					<sub src="me()" trait="x"/>
					<sub> 4 </sub>
				</wrapwidth>
				<x> 85 </x>
				<y>
					<copy src="parent()" trait="height" />
					<sub src="me()" trait="height" />
					<div> 2 </div>
				</y>
			</text>
		</rect>
		
		
		<!-- INGREDIENT 2 =================================================================-->
		<rect name="ingredient_two">
			<id>9</id>
			<alpha> 0 </alpha>
			<user10> &false; </user10>
			<locus> &true; </locus>
			<target> &true; </target>
			<depth> 1 </depth>
			<x>
				<copy src="ingredient_one" trait="x"/>
			</x>
			<y>
				<copy src="ingredient_one" trait="y" />
				<add src="ingredient_one" trait="height" />
				<add src="parent()" trait="_ingredient_buffer"/>
			</y>
			<height>
				<copy src="ingredient_one" trait="height"/>
			</height>
			<width>
				<copy src="ingredient_one" trait="width"/>
			</width>
			<string> <copy src="strings()" trait="_ingredienttwo"/> </string> <!-- current value, string -->

			<user0> <copy src="strings()" trait="_addingredient"/> </user0>
			
			<xdefault> &false; </xdefault>
			<xup> <ref src="ingredient_one" trait="mouseover"/> </xup>
			<xdown> <ref src="ingredient_three" trait="mouseover"/> </xdown>
			
			<image name="ingredient_two_icon">
				<depth> 1 </depth>
				<id>19</id>
				<visible> &false; </visible>
				<filename></filename>
				<width>
					<copy src="ingredient_one_icon" trait="width"/>
				</width>
				<height>
					<copy src="ingredient_one_icon" trait="height"/>
				</height>
				<x>
					<copy src="ingredient_one_icon" trait="x"/>
				</x>
				<y>
					<copy src="ingredient_one_icon" trait="y"/>
				</y>
				<locus>&true;</locus>
				<user0></user0>			<!-- stack count -->
				<text name="ingredient_two_stack_count">
					<depth>1</depth>
					<font>3</font>
					<justify> &right; </justify>
					<string>
						<copy src="parent()" trait="user0"/>
					</string>
					<red> 117 </red>
					<green> 59 </green>
					<blue> 33 </blue>
					<alpha>255</alpha>
					<x> 72 </x>
					<y> 46 </y>
				</text>
			</image>
			<text name="ingredient_two_text">
				<depth> 1 </depth>
				<string>
					<copy src="parent()" trait="user0" />
				</string>
				<red> 117 </red>
				<green> 59 </green>
				<blue> 33 </blue>
				<alpha> 255 </alpha>
				<wrapwidth>
					<copy src="parent()" trait="width"/>
					<sub src="me()" trait="x"/>
					<sub> 4 </sub>
				</wrapwidth>
				<x>
					<copy src="ingredient_one_text" trait="x"/>
				</x>
				<y>
					<copy src="parent()" trait="height" />
					<sub src="me()" trait="height" />
					<div> 2 </div>
				</y>
			</text>
		</rect>
		
		<!-- INGREDIENT 3 =================================================================-->
		<rect name="ingredient_three">
			<id>10</id>
			<alpha> 0 </alpha>
			<user10> &false; </user10>
			<locus> &true; </locus>
			<target> &true; </target>
			<depth> 1 </depth>
			<x>
				<copy src="ingredient_one" trait="x"/>
			</x>
			<y>
				<copy src="ingredient_two" trait="y" />
				<add src="ingredient_two" trait="height" />
				<add src="parent()" trait="_ingredient_buffer"/>
			</y>
			<height>
				<copy src="ingredient_one" trait="height"/>
			</height>
			<width>
				<copy src="ingredient_one" trait="width"/>
			</width>
			<string> <copy src="strings()" trait="_ingredientthree"/> </string> <!-- current value, string -->

			<user0> <copy src="strings()" trait="_addingredient"/> </user0>
			
			<xdefault> &false; </xdefault>
			<xup> <ref src="ingredient_two" trait="mouseover"/> </xup>
			<xdown> <ref src="ingredient_four" trait="mouseover"/> </xdown>
			
			<image name="ingredient_three_icon">
				<id>20</id>
				<depth> 1 </depth>
				<visible> &false; </visible>
				<filename>
					
				</filename>
				<width>
					<copy src="ingredient_one_icon" trait="width"/>
				</width>
				<height>
					<copy src="ingredient_one_icon" trait="height"/>
				</height>
				<x>
					<copy src="ingredient_one_icon" trait="x"/>
				</x>
				<y>
					<copy src="ingredient_one_icon" trait="y"/>
				</y>
				<locus>&true;</locus>
				<user0></user0>			<!-- stack count -->
				<text name="ingredient_three_stack_count">
					<depth>1</depth>
					<font>3</font>
					<justify> &right; </justify>
					<string>
						<copy src="parent()" trait="user0"/>
					</string>
					<red> 117 </red>
					<green> 59 </green>
					<blue> 33 </blue>
					<alpha>255</alpha>
					<x> 72 </x>
					<y> 46 </y>
				</text>
			</image>
			<text name="ingredient_three_text">
				<depth> 1 </depth>
				<string>
					<copy src="parent()" trait="user0" />
				</string>
				<red> 117 </red>
				<green> 59 </green>
				<blue> 33 </blue>
				<alpha> 255 </alpha>
				<wrapwidth>
					<copy src="parent()" trait="width"/>
					<sub src="me()" trait="x"/>
					<sub> 4 </sub>
				</wrapwidth>
				<x>
					<copy src="ingredient_one_text" trait="x"/>
				</x>
				<y>
					<copy src="parent()" trait="height" />
					<sub src="me()" trait="height" />
					<div> 2 </div>
				</y>
			</text>
		</rect>
		
		<!-- INGREDIENT 4 =================================================================-->
		<rect name="ingredient_four">
			<id>11</id>
			<alpha> 0 </alpha>
			<user10> &false; </user10>
			<locus> &true; </locus>
			<target> &true; </target>
			<depth> 1 </depth>
			<x>
				<copy src="ingredient_one" trait="x"/>
			</x>
			<y>
				<copy src="ingredient_three" trait="y" />
				<add src="ingredient_three" trait="height" />
				<add src="parent()" trait="_ingredient_buffer"/>
			</y>
			<height>
				<copy src="ingredient_one" trait="height"/>
			</height>
			<width>
				<copy src="ingredient_one" trait="width"/>
			</width>
			<string> <copy src="strings()" trait="_ingredientfour"/> </string> <!-- current value, string -->

			<user0> <copy src="strings()" trait="_addingredient"/> </user0>
			
			<xdefault> &false; </xdefault>
			<xup> <ref src="ingredient_three" trait="mouseover"/> </xup>
			<xdown> <ref src="alchemy_button_create" trait="mouseover"/> </xdown>
			
			<image name="ingredient_four_icon">
				<id>21</id>
				<depth> 1 </depth>
				<visible> &false; </visible>
				<filename>	
				</filename>
				<width>
					<copy src="ingredient_one_icon" trait="width"/>
				</width>
				<height>
					<copy src="ingredient_one_icon" trait="height"/>
				</height>
				<x>
					<copy src="ingredient_one_icon" trait="x"/>
				</x>
				<y>
					<copy src="ingredient_one_icon" trait="y"/>
				</y>
				<locus>&true;</locus>
				<user0></user0>			<!-- stack count -->
				<text name="ingredient_four_stack_count">
					<depth>1</depth>
					<font>3</font>
					<justify> &right; </justify>
					<string>
						<copy src="parent()" trait="user0"/>
					</string>
					<red> 117 </red>
					<green> 59 </green>
					<blue> 33 </blue>
					<alpha>255</alpha>
					<x> 72 </x>
					<y> 46 </y>
				</text>
			</image>
			<text name="ingredient_four_text">
				<depth> 1 </depth>
				<string>
					<copy src="parent()" trait="user0" />
				</string>
				<red> 117 </red>
				<green> 59 </green>
				<blue> 33 </blue>
				<alpha> 255 </alpha>
				<wrapwidth>
					<copy src="parent()" trait="width"/>
					<sub src="me()" trait="x"/>
					<sub> 4 </sub>
				</wrapwidth>
				<x>
					<copy src="ingredient_one_text" trait="x"/>
				</x>
				<y>
					<copy src="parent()" trait="height" />
					<sub src="me()" trait="height" />
					<div> 2 </div>
				</y>
			</text>
		</rect>
		
		
		<!-- LIST LABEL ===============================================================-->
		<text name="effects_label">
			<string> <copy src="strings()" trait="_effects"/> </string>
			<alpha>255</alpha>
			<depth>1</depth>
			<font>3</font>
			<red> 117 </red>
			<green> 59 </green>
			<blue> 33 </blue>
			<x>
				<copy src="effect_list" trait="x"/>
				<!--add>
					<copy src="effect_list" trait="width"/>
					<sub src="me()" trait="width"/>
					<div>2</div>
				</add-->
			</x>
			<y>312</y>
		</text>
		
		<!-- LIST SCROLL ===============================================================-->
		<image name="effect_list_scroll_bar">
<include src="vertical_scroll.xml"/>
			<id> 16 </id>
			<x>
				<copy src="effect_list" trait="x"/>
				<add src="effect_list" trait="width"/>
			</x>
			<y>
				<copy src="effect_list" trait="y" />
				<add> 32 </add>
			</y>
			<height>
				<copy src="effect_list" trait="height" />
				<sub> 64 </sub>
			</height>
			<depth>20</depth>
			<target> &true; </target>
			<user1> 0 </user1> <!-- minimum range value -->
			<user2>
				<copy src="effect_list" trait="child_count" />
				<sub> 12 </sub>
			</user2> <!-- maximum range value - set by code -->
			<user3> 1 </user3> <!-- step distance -->
			<user4> 6 </user4> <!-- jump distance -->
			<user5> 0 </user5> <!-- starting value -->
			<user6> 17 </user6> <!-- marker's id - must change to enable dragging -->
			<!-- user7 = current value -->
			<user8> &false; </user8> <!-- is text value field visible -->
		</image>
		
		<!-- LIST ===============================================================-->
		<rect name="effect_list">
			<id> 12 </id>
			<alpha> 0 </alpha>
			<depth> 8 </depth>
			<locus> &true; </locus>
			<height>
				<copy src="ingredient_one" trait="height"/>
				<mult> 4 </mult>
				<add>
					<copy src="parent()" trait="_ingredient_buffer"/>
					<mult> 3 </mult>
				</add>
			</height>
			<width> 308 </width>
			<x> 620 </x>
			<y> <copy src="ingredient_one" trait="y"/> </y>
			
			<!-- template items added here by code -->
			
		</rect>
		
		
		
		<!-- CREATE BUTTON ===============================================================-->
		<image name="alchemy_button_create">
<include src="button_long.xml" />
			<id> 14 </id>
			<target> <copy src="me()" trait="user1"/> </target>
			<x>
				<copy src="parent()" trait="width" />
				<sub src="me()" trait="width" />
				<div> 2 </div>
				<sub>190</sub>
			</x>
			<y>
				<copy src="parent()" trait="height"/>
				<mult>0.8</mult>
			</y>
			<depth> 3 </depth>
			<clicksound>2</clicksound>
			<user0> <copy src="strings()" trait="_create"/> </user0>
			<user1> &false; </user1>			<!-- enabled - true=enabled, false=disabled -->
			
			<user20> &xbuttonx; </user20>
			<xdefault> &xboxhint; </xdefault>
			<xright> <ref src="alchemy_button_exit" trait="mouseover"/> </xright>
			<xup> <ref src="ingredient_four" trait="mouseover"/> </xup>
			<xdown> <ref src="alchemy_button_exit" trait="mouseover"/> </xdown>
		</image>
		
		
		<!-- EXIT BUTTON ===============================================================-->
		<image name="alchemy_button_exit">
<include src="button_short.xml" />
			<id> 15 </id>
			<target> &true; </target>
			<x>
				<copy src="parent()" trait="width" />
				<sub src="me()" trait="width" />
				<div> 2 </div>
				<add>200</add>
			</x>
			<y>
				<copy src="alchemy_button_create" trait="y" />
			</y>
			<depth> 3 </depth>
			<clicksound>2</clicksound>
			<user0> <copy src="strings()" trait="_exit"/> </user0>
			
			<user20> &xbuttonb; </user20>
			<xdefault> &xboxhint; </xdefault>
			<xleft> <ref src="alchemy_button_create" trait="mouseover"/> </xleft>
			<xup> <ref src="ingredient_four" trait="mouseover"/> </xup>
		</image>

	</image> <!-- background -->
	
	
	
	
	<!-- TEMPLATE ==================================================================-->
	<template name="effect_template">
		<rect name="Effects">
			<alpha> 0 </alpha>
			<user10> &false; </user10>
			<locus> &true; </locus>
			<target> &true; </target>
			<repeatvertical> &true; </repeatvertical>
			<depth> 1 </depth>
			<visible>
				<copy src="me()" trait="y" />
				<gte> 0 </gte>
				<and>
					<copy src="me()" trait="y" />
					<add> 20 </add>
					<lt src="parent()" trait="height" />
				</and>
			</visible>
			<x> 0 </x>
			<y>
				<copy src="me()" trait="user0" />
				<mult src="me()" trait="height" />
				<sub>
					<copy src="me()" trait="height" />
					<mult src="effect_list_scroll_bar" trait="user7" />
				</sub>
			</y>
			<height> 60 </height>
			<width>
				<copy src="effect_list" trait="width"/>
			</width>
			<user0></user0> <!-- effect description string -->
			<user1></user1> <!-- icon pathname -->
			<image name="effect_icon">
				<filename>
					<copy src="parent()" trait="user1" />
				</filename>
				<zoom>-1</zoom>
				<width> 32 </width>
				<height> 32 </height>
				<x> 5 </x>
				<y>
					<copy src="parent()" trait="height" />
					<sub> 32 </sub>
					<div> 2 </div>
					<add> 2 </add>
				</y>
			</image>
			<text name="effect_text">
				<font> 3 </font>
				<string>
					<copy src="parent()" trait="user3" />
				</string>
				<wrapwidth>
					<copy src="parent()" trait="width"/>
					<sub src="me()" trait="x"/>
				</wrapwidth>
				<x> 50 </x>
				<y>
					<copy src="parent()" trait="height" />
					<sub src="me()" trait="height" />
					<div> 2 </div>
				</y>
				<font>3</font>
				<red> 117 </red>
				<green> 59 </green>
				<blue> 33 </blue>
				<alpha> 255 </alpha>
			</text>
		</rect>
	</template>
</menu>
