<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.0">

	<windowclass name="feuillepersonnage_urbain">
		<frame name="generique_feuillepersonnage_urbain" />
		<datasource name="feuillepersonnage" />
		<placement>
			<size>
				<width>462</width>
				<height>650</height>
			</size>
			<position>
				<x>415</x>
				<y>450</y>
			</position>
		</placement>
		
		<sheetdata>
			
			<!-- ********** ENTETE *************************************************************************************************-->
			<!-- Nom -->
			<stringfield name="name" >
				<bounds rect="107,38,167,20" />
				<font name="sheettext" />
			</stringfield>
			
			<!-- Obsession -->
			<stringfield name="obsession" >
				<bounds rect="82,58,192,20" />
				<font name="sheettext" />
			</stringfield>
			
			<!-- Ecole ou archétype -->
			<stringfield name="ecolearchetype" >
				<bounds rect="291,57,154,20" />
				<font name="sheettext" />
			</stringfield>
			
			<!-- Element declencheur -->
			<stringfield name="ElementDeclencheur" >
				<bounds rect="136,84,310,42" />
				<multiline spacing="20" />
				<font name="sheettext" />
			</stringfield>
			
			<!-- Stimuli de Rage -->
			<stringfield name="stimuliderage" >
				<bounds rect="18,185,133,20" />
				<font name="sheettext" />
			</stringfield>			

			<!-- Stimuli de Peur -->
			<stringfield name="stimulidepeur" >
				<bounds rect="162,185,133,20" />
				<font name="sheettext" />
			</stringfield>	

			<!-- Stimuli de Noblesse-->
			<stringfield name="stimulidenoblesse" >
				<bounds rect="307,185,133,20" />
				<font name="sheettext" />
			</stringfield>	

			<!-- Corps-->
		
			<numberComp name="Corps_valeur">				
				<bounds rect="70,250,33,25" />
				<script>
					function rollDice()
						local desc = getValue();					
						ChatManager.throwDice("dice", {"d100","d10"}, 0, "Corps ("..getValue().."%) [Sans compétence : " .. math.ceil(getValue()-30) .. "%]");
					end			  
					function onDoubleClick(x, y)
						rollDice();
					end
				</script>
			</numberComp>
			
			<!-- Compétences de Corps-->
			<windowlist name="ListeCompcorps">
				<bounds rect="10,280,120,235" />
				<!-- <frame name="frameFondBleu" /> -->
				<datasource>.ListeCompcorps</datasource>
				<class>ITEM_ListeCompcorps</class>
				<allowcreate />
				<allowdelete />
				<skipempty />
				<script>
				function onSortCompare(w1, w2)
						local name1 = string.lower(w1.Compcorps.getValue());
						local name2 = string.lower(w2.Compcorps.getValue());

						--[[Champ1 Vide]]
						if name1 == "" then							
							return true;
						--[[Champ2 Vide]]
						elseif name2 == "" then							
							return false;
						--[[Les 2 Champs sont pleins]]
						else
							return name1 > name2;
						end
					end

					function onListRearranged(listchanged)
						local containermapping = {};

						for k, w in ipairs(getWindows()) do
							local entry = {};
							entry.name = w.Compcorps.getValue();
							entry.window = w;
							table.insert(containermapping, entry);
						end	
					end
				</script>
			</windowlist>
			


			<!-- Vitesse-->

			<numberComp name="Vitesse_valeur">				
				<bounds rect="193,250,33,25" />
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "Vitesse ("..getValue().."%) [Sans compétence : " .. math.ceil(getValue()-30) .. "%]");
					end
				</script>
			</numberComp>
			
			<!-- Compétences de Vitesse-->
			<windowlist name="ListeCompvitesse">
				<bounds rect="120,280,120,235" />
				<!-- <frame name="frameFondBleu" /> -->
				<datasource>.ListeCompvitesse</datasource>
				<class>ITEM_ListeCompvitesse</class>
				<allowcreate />
				<allowdelete />
				<skipempty />
				<script>
				function onSortCompare(w1, w2)
						local name1 = string.lower(w1.Compvitesse.getValue());
						local name2 = string.lower(w2.Compvitesse.getValue());

						--[[Champ1 Vide]]
						if name1 == "" then							
							return true;
						--[[Champ2 Vide]]
						elseif name2 == "" then							
							return false;
						--[[Les 2 Champs sont pleins]]
						else
							return name1 > name2;
						end
					end

					function onListRearranged(listchanged)
						local containermapping = {};

						for k, w in ipairs(getWindows()) do
							local entry = {};
							entry.name = w.Compvitesse.getValue();
							entry.window = w;
							table.insert(containermapping, entry);
						end	
					end
				</script>
			</windowlist>
			
	
			
			
			<!-- Esprit-->

			<numberComp name="Esprit_valeur">				
				<bounds rect="308,250,33,25" />
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "Esprit ("..getValue().."%) [Sans compétence : " .. math.ceil(getValue()-30) .. "%]");
					end
				</script>
			</numberComp>
			
			<!-- Compétences de Esprit-->
			<windowlist name="ListeCompesprit">
				<bounds rect="235,280,120,235" />
				<!-- <frame name="frameFondBleu" /> -->
				<datasource>.ListeCompesprit</datasource>
				<class>ITEM_ListeCompesprit</class>
				<allowcreate />
				<allowdelete />
				<skipempty />
				<script>
				function onSortCompare(w1, w2)
						local name1 = string.lower(w1.Compesprit.getValue());
						local name2 = string.lower(w2.Compesprit.getValue());

						--[[Champ1 Vide]]
						if name1 == "" then							
							return true;
						--[[Champ2 Vide]]
						elseif name2 == "" then							
							return false;
						--[[Les 2 Champs sont pleins]]
						else
							return name1 > name2;
						end
					end

					function onListRearranged(listchanged)
						local containermapping = {};

						for k, w in ipairs(getWindows()) do
							local entry = {};
							entry.name = w.Compesprit.getValue();
							entry.window = w;
							table.insert(containermapping, entry);
						end	
					end
				</script>
			</windowlist>
			
	
			
			
			<!-- Âme-->

			<numberComp name="Ame_valeur">				
				<bounds rect="407,250,33,25" />
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "Âme ("..getValue().."%) [Sans compétence : " .. math.ceil(getValue()-30) .. "%]");
					end
				</script>
			</numberComp>
			
			<!-- Compétences de Âme-->
			<windowlist name="ListeCompame">
				<bounds rect="350,280,108,235" />
				<!-- <frame name="frameFondBleu" /> -->
				<datasource>.ListeCompame</datasource>
				<class>ITEM_ListeCompame</class>
				<allowcreate />
				<allowdelete />
				<skipempty />
				<script>
				function onSortCompare(w1, w2)
						local name1 = string.lower(w1.Compame.getValue());
						local name2 = string.lower(w2.Compame.getValue());

						--[[Champ1 Vide]]
						if name1 == "" then							
							return true;
						--[[Champ2 Vide]]
						elseif name2 == "" then							
							return false;
						--[[Les 2 Champs sont pleins]]
						else
							return name1 > name2;
						end
					end

					function onListRearranged(listchanged)
						local containermapping = {};

						for k, w in ipairs(getWindows()) do
							local entry = {};
							entry.name = w.Compame.getValue();
							entry.window = w;
							table.insert(containermapping, entry);
						end	
					end
				</script>
			</windowlist>

			<!-- Endurcissements Violence-->			
			<checkbox name="enduvio">
				<bounds rect="22,573,12,12" />				
			</checkbox>						
			<checkbox name="enduvio2">
				<bounds rect="34,573,12,12" />				
			</checkbox>	
			<checkbox name="enduvio3">
				<bounds rect="46,573,12,12" />				
			</checkbox>	
			<checkbox name="enduvio4">
				<bounds rect="58,573,12,12" />				
			</checkbox>	
			<checkbox name="enduvio5">
				<bounds rect="70,573,12,12" />				
			</checkbox>	

			<checkbox name="enduvio6">
				<bounds rect="22,585,12,12" />				
			</checkbox>	
			<checkbox name="enduvio7">
				<bounds rect="34,585,12,12" />				
			</checkbox>	
			<checkbox name="enduvio8">
				<bounds rect="46,585,12,12" />				
			</checkbox>	
			<checkbox name="enduvio9">
				<bounds rect="58,585,12,12" />				
			</checkbox>	
			<checkbox name="enduvio10">
				<bounds rect="70,585,12,12" />				
			</checkbox>				

			<!-- Fragilisations Violence-->			
			<checkbox name="fragivio">
				<bounds rect="22,624,12,12" />				
			</checkbox>						
			<checkbox name="fragivio2">
				<bounds rect="34,624,12,12" />				
			</checkbox>	
			<checkbox name="fragivio3">
				<bounds rect="46,624,12,12" />				
			</checkbox>	
			<checkbox name="fragivio4">
				<bounds rect="58,624,12,12" />				
			</checkbox>	
			<checkbox name="fragivio5">
				<bounds rect="70,624,12,12" />				
			</checkbox>	
			
			<!-- Endurcissements Surnaturel-->			
			<checkbox name="endusurna">
				<bounds rect="112,573,12,12" />				
			</checkbox>						
			<checkbox name="endusurna2">
				<bounds rect="124,573,12,12" />				
			</checkbox>	
			<checkbox name="endusurna3">
				<bounds rect="136,573,12,12" />				
			</checkbox>	
			<checkbox name="endusurna4">
				<bounds rect="148,573,12,12" />				
			</checkbox>	
			<checkbox name="endusurna5">
				<bounds rect="160,573,12,12" />				
			</checkbox>	

			<checkbox name="endusurna6">
				<bounds rect="112,585,12,12" />				
			</checkbox>	
			<checkbox name="endusurna7">
				<bounds rect="124,585,12,12" />				
			</checkbox>	
			<checkbox name="endusurna8">
				<bounds rect="136,585,12,12" />				
			</checkbox>	
			<checkbox name="endusurna9">
				<bounds rect="148,585,12,12" />				
			</checkbox>	
			<checkbox name="endusurna10">
				<bounds rect="160,585,12,12" />				
			</checkbox>							
			
			<!-- Fragilisations Surnaturel-->			
			<checkbox name="fragifragi">
				<bounds rect="112,624,12,12" />				
			</checkbox>						
			<checkbox name="fragifragi2">
				<bounds rect="124,624,12,12" />				
			</checkbox>	
			<checkbox name="fragifragi3">
				<bounds rect="136,624,12,12" />				
			</checkbox>	
			<checkbox name="fragifragi4">
				<bounds rect="148,624,12,12" />				
			</checkbox>	
			<checkbox name="fragifragi5">
				<bounds rect="160,624,12,12" />				
			</checkbox>	

			<!-- Endurcissements Impuissance-->			
			<checkbox name="enduimpui">
				<bounds rect="210,573,12,12" />				
			</checkbox>						
			<checkbox name="enduimpui2">
				<bounds rect="222,573,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui3">
				<bounds rect="234,573,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui4">
				<bounds rect="246,573,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui5">
				<bounds rect="258,573,12,12" />				
			</checkbox>	

			<checkbox name="enduimpui6">
				<bounds rect="210,585,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui7">
				<bounds rect="222,585,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui8">
				<bounds rect="234,585,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui9">
				<bounds rect="246,585,12,12" />				
			</checkbox>	
			<checkbox name="enduimpui10">
				<bounds rect="258,585,12,12" />				
			</checkbox>	

			<!-- Fragilisations Impuissance-->			
			<checkbox name="fragiimpui">
				<bounds rect="210,624,12,12" />				
			</checkbox>						
			<checkbox name="fragiimpui2">
				<bounds rect="222,624,12,12" />				
			</checkbox>	
			<checkbox name="fragiimpui3">
				<bounds rect="234,624,12,12" />				
			</checkbox>	
			<checkbox name="fragiimpui4">
				<bounds rect="246,624,12,12" />				
			</checkbox>	
			<checkbox name="fragiimpui5">
				<bounds rect="258,624,12,12" />				
			</checkbox>	

			<!-- Endurcissements Solitude-->			
			<checkbox name="endusolitude">
				<bounds rect="300,573,12,12" />				
			</checkbox>						
			<checkbox name="endusolitude2">
				<bounds rect="312,573,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude3">
				<bounds rect="324,573,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude4">
				<bounds rect="336,573,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude5">
				<bounds rect="348,573,12,12" />				
			</checkbox>	

			<checkbox name="endusolitude6">
				<bounds rect="300,585,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude7">
				<bounds rect="312,585,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude8">
				<bounds rect="324,585,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude9">
				<bounds rect="336,585,12,12" />				
			</checkbox>	
			<checkbox name="endusolitude10">
				<bounds rect="348,585,12,12" />				
			</checkbox>	
			
			<!-- Fragilisations Solitude-->			
			<checkbox name="fragisoli">
				<bounds rect="300,624,12,12" />				
			</checkbox>						
			<checkbox name="fragisoli2">
				<bounds rect="312,624,12,12" />				
			</checkbox>	
			<checkbox name="fragisoli3">
				<bounds rect="324,624,12,12" />				
			</checkbox>	
			<checkbox name="fragisoli4">
				<bounds rect="336,624,12,12" />				
			</checkbox>	
			<checkbox name="fragisoli5">
				<bounds rect="348,624,12,12" />				
			</checkbox>	

			<!-- Endurcissements Soi-->			
			<checkbox name="endusoi">
				<bounds rect="384,573,12,12" />				
			</checkbox>						
			<checkbox name="endusoi2">
				<bounds rect="396,573,12,12" />				
			</checkbox>	
			<checkbox name="endusoi3">
				<bounds rect="408,573,12,12" />				
			</checkbox>	
			<checkbox name="endusoi4">
				<bounds rect="420,573,12,12" />				
			</checkbox>	
			<checkbox name="endusoi5">
				<bounds rect="432,573,12,12" />				
			</checkbox>	

			<checkbox name="endusoi6">
				<bounds rect="384,585,12,12" />				
			</checkbox>	
			<checkbox name="endusoi7">
				<bounds rect="396,585,12,12" />				
			</checkbox>	
			<checkbox name="endusoi8">
				<bounds rect="408,585,12,12" />				
			</checkbox>	
			<checkbox name="endusoi9">
				<bounds rect="420,585,12,12" />				
			</checkbox>	
			<checkbox name="endusoi10">
				<bounds rect="432,585,12,12" />				
			</checkbox>	

			<!-- Fragilisations Soi-->			
			<checkbox name="fragisoi">
				<bounds rect="384,624,12,12" />				
			</checkbox>						
			<checkbox name="fragisoi2">
				<bounds rect="396,624,12,12" />				
			</checkbox>	
			<checkbox name="fragisoi3">
				<bounds rect="408,624,12,12" />				
			</checkbox>	
			<checkbox name="fragisoi4">
				<bounds rect="420,624,12,12" />				
			</checkbox>	
			<checkbox name="fragisoi5">
				<bounds rect="432,624,12,12" />				
			</checkbox>	
			
		</sheetdata>
	</windowclass>

	<template name="numberComp">
		<numberfield>
			<frame name="fondgris" />
			<font name="sheetnumber" />
			<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 100 then
							setValue(100);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 100 then
							setValue(100);
						end
					end
				</script>			
		</numberfield>
	</template>

	<!--===========================================================================================-->
	<windowclass name="ITEM_ListeCompcorps">
		
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
	
		<sheetdata>			
			<!----------------------------------- Compétences de Corps -->
			<textlistitemvalue name="Compcorps">
				<anchored>
					<left>
						<anchor>left</anchor>
					</left>
					<right>
						<anchor>right</anchor>
						<offset>-40</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>										
			
			<!----------------------------------- Compétences de Corps -->
			<numberfield name="Compcorps_valeur" source="Valeurs.compcorps">
			<noreset />
				<anchored>
					<left>
						<parent>Compcorps</parent>
						<anchor>right</anchor>
						<offset>2</offset>
					</left>					
					<top>
						<anchor>top</anchor>
					</top>
					<right>
						<anchor>right</anchor>
						<offset>-5</offset>
					</right>
				</anchored>
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "("..getValue().."%)");
					end
				</script>
				
			<font name="sheetnumbersmall" />
			</numberfield>		
			</sheetdata>
	</windowclass>	

	<!--===========================================================================================-->
	<windowclass name="ITEM_ListeCompvitesse">
		
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
	
		<sheetdata>			
			<!----------------------------------- Compétences de Vitesse -->
			<textlistitemvalue name="Compvitesse">
				<anchored>
					<left>
						<anchor>left</anchor>
					</left>
					<right>
						<anchor>right</anchor>
						<offset>-30</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>										
			
			<!----------------------------------- Compétences de Vitesse -->
			<numberfield name="Compvitesse_valeur" source="Valeurs.compvitesse">
			<noreset />
				<anchored>
					<left>
						<parent>Compvitesse</parent>
						<anchor>right</anchor>
						<offset>2</offset>
					</left>					
					<top>
						<anchor>top</anchor>
					</top>
					<right>
						<anchor>right</anchor>
						<offset>-5</offset>
					</right>
				</anchored>
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "("..getValue().."%)");
					end
				</script>
				
				<font name="sheetnumbersmall" />
			</numberfield>		
			</sheetdata>
	</windowclass>	

	<!--===========================================================================================-->
	<windowclass name="ITEM_ListeCompesprit">
		
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
	
		<sheetdata>			
			<!----------------------------------- Compétences de esprit -->
			<textlistitemvalue name="Compesprit">
				<anchored>
					<left>
						<anchor>left</anchor>
					</left>
					<right>
						<anchor>right</anchor>
						<offset>-30</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>										
			
			<!----------------------------------- Compétences de esprit -->
			<numberfield name="Compesprit_valeur" source="Valeurs.compesprit">
			<noreset />
				<anchored>
					<left>
						<parent>Compesprit</parent>
						<anchor>right</anchor>
						<offset>2</offset>
					</left>					
					<top>
						<anchor>top</anchor>
					</top>
					<right>
						<anchor>right</anchor>
						<offset>-5</offset>
					</right>
				</anchored>
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "("..getValue().."%)");
					end
				</script>
				
				<font name="sheetnumbersmall" />
			</numberfield>		
			</sheetdata>
	</windowclass>	
	
	<!--===========================================================================================-->
	<windowclass name="ITEM_ListeCompame">
		
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
	
		<sheetdata>			
			<!----------------------------------- Compétences de ame -->
			<textlistitemvalue name="Compame">
				<anchored>
					<left>
						<anchor>left</anchor>
					</left>
					<right>
						<anchor>right</anchor>
						<offset>-30</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>										
			
			<!----------------------------------- Compétences de ame -->
			<numberfield name="Compame_valeur" source="Valeurs.compame">
			<noreset />
				<anchored>
					<left>
						<parent>Compame</parent>
						<anchor>right</anchor>
						<offset>2</offset>
					</left>					
					<top>
						<anchor>top</anchor>
					</top>
					<right>
						<anchor>right</anchor>
						<offset>-5</offset>
					</right>
				</anchored>
				<script>
					function onDoubleClick()						
						ChatManager.throwDice("dice",{"d100","d10"}, 0, "("..getValue().."%)");
					end
				</script>
				
				<font name="sheetnumbersmall" />
			</numberfield>		
			</sheetdata>
	</windowclass>	
</root>