<!-- This file is provided under the Open Game License version 1.0a
  -- For more information on OGL and related issues, see 
  --   http://www.wizards.com/d20
  --
  -- For information on the Fantasy Grounds d20 Ruleset licensing and
  -- the OGL license text, see the d20 ruleset license in the program
  -- options.
  --
  -- All producers of work derived from this definition are adviced to
  -- familiarize themselves with the above licenses, and to take special
  -- care in providing the definition of Product Identity (as specified
  -- by the OGL) in their products.
  --
  -- Copyright 2007 SmiteWorks Ltd.

  -->

 
<!-- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
	Hollow Earth Expedition - COMBAT TRACKER

	Version 1.0.0
	05/05/2009
	Grimmbart de Ferdock
	
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->

  
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.0">
	<template name="combattrackerffsource">
		<genericcontrol>
			<script>
				function onInit()
					setHoverCursor("hand");
				end
			
				function onDrag(button, x, y, draginfo)
					draginfo.setType("combattrackerff");

					draginfo.setIcon(icon[1]);
					draginfo.setStringData(value[1]);

					return true;
				end
			</script>
		</genericcontrol>
	</template>

	<windowclass name="combattracker_effect">
		<sizelimits>
			<minimum>
				<height>22</height>
			</minimum>
		</sizelimits>
		<sheetdata>
			<stringcontrol name="label">
				<bounds>0,4,75,17</bounds>
				<font>sheettextsmall</font>
				<frame>
					<name>textline</name>
					<offset>0,1,0,0</offset>
				</frame>
				<tabtarget>
					<next>duration</next>
					<prev>adjustment</prev>
				</tabtarget>
				<script>
					function onDeleteUp()
						if #(window.windowlist.getWindows()) &gt; 1 then
							window.close();
						end
					end
					
					function onDeleteDown()
						if #(window.windowlist.getWindows()) &gt; 1 then
							window.close();
						end
					end

					function onGainFocus()
						if getValue() == "" then
							wasempty = true;
						else
							wasempty = false;
						end
					end
					
					function onValueChanged()
						window.windowlist.checkForEmpty();

						if wasempty then
							casterentry = window.windowlist.window.windowlist.getActiveEntry();
							if casterentry then
								window.caster.setSource(casterentry);
							end
							
							wasempty = false;
						end
					end
				</script>
			</stringcontrol>
			
			<numbercontrol name="duration">
				<anchored>
					<left>
						<parent>label</parent>
						<anchor>right</anchor>
					</left>
					<top>
						<anchor>top</anchor>
					</top>
					<size>
						<width>30</width>
						<height>22</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<frame>
					<name>bonus</name>
					<offset>2,2,2,1</offset>
				</frame>
				<keyeditframe>
					<name>sheetfocus</name>
					<offset>2,2,2,2</offset>
				</keyeditframe>
				<tabtarget>
					<next>adjustment</next>
					<prev>label</prev>
				</tabtarget>
			</numbercontrol>
			<numbercontrol name="adjustment">
				<anchored>
					<left>
						<parent>duration</parent>
						<anchor>right</anchor>
					</left>
					<top>
						<anchor>top</anchor>
					</top>
					<size>
						<width>30</width>
						<height>22</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<hideonvalue>0</hideonvalue>
				<displaysign />
				<frame>
					<name>durationadjustment</name>
					<offset>2,2,2,2</offset>
				</frame>
				<keyeditframe>
					<name>sheetfocus</name>
					<offset>2,2,2,2</offset>
				</keyeditframe>
				<droptypes>
					<type>combattrackerentry</type>
				</droptypes>
				<stateframe>
					<drophilight>
						<name>sheetfocus</name>
						<offset>2,2,2,2</offset>
					</drophilight>
				</stateframe>
				<tabtarget>
					<next>label</next>
					<prev>duration</prev>
				</tabtarget>
				<script>
					function onValueChanged()
						window.caster.updateVisibility();
					end
					
					function onDrop(x, y, draginfo)
						if draginfo.isType("combattrackerentry") then
							window.caster.setSource(draginfo.getCustomData());
							return true;
						end
					end
				</script>
			</numbercontrol>

			<stringcontrol name="caster">
				<anchored>
					<right>
						<parent>adjustment</parent>
						<anchor>right</anchor>
						<offset>-5</offset>
					</right>
					<top>
						<parent>duration</parent>
						<anchor>bottom</anchor>
					</top>
					<size>
						<height>12</height>
					</size>
				</anchored>
				<center />
				<static />
				<font>sheetlabelsmall</font>
				<color>#7f000000</color>
				<empty>&#171; SansNom &#187;</empty>
				<invisible />
				<script>
					function updateVisibility()
						if sourceentry and window.adjustment.getValue() ~= 0 then
							setVisible(true);
						else
							setVisible(false);
						end
					end
				
					function getSource()
						return sourceentry;
					end
				
					function setSource(entry)
						if sourceentry then
							sourceentry.removeObserver(self);
						end
					
						sourceentry = entry;
						
						if sourceentry then
							sourceentry.addObserver(self);
							setValue("Update on: " .. sourceentry.name.getValue());
							updateVisibility();
						else
							updateVisibility();
						end
					end
					
					function observedNameChanged(source)
						setValue("Update on: " .. sourceentry.name.getValue());
					end
					
					function observedClosed(source)
						if source == sourceentry then
							sourceentry = nil;
							setValue(nil);
							updateVisibility();
						end
					end
					
					function onClickDown(button, x, y)
						if button == 2 then
							setSource(nil);
						end
					end
					
					function onDrop(x, y, draginfo)
						if draginfo.isType("combattrackerentry") then
							setSource(draginfo.getCustomData());
							return true;
						end
					end
				</script>
			</stringcontrol>
		</sheetdata>
	</windowclass>

	
	
	
	
	
	
	<windowclass name="combattracker_entry">
		<frame>ctentrybox</frame>
		
		<!-- Hauteur de la zone pour 1 personnage -->
		<sizelimits>
			<minimum>
				<height>165</height>
			</minimum>
		</sizelimits>
		<script file="scripts/combattracker_entry.lua" />
		<sheetdata>		
			<tokencontrol name="token">
				<bounds>33,6,23,23</bounds>
				<empty>indicator_emptytoken</empty>
				<script file="scripts/combattracker_token.lua" />
			</tokencontrol>
			
			<stringcontrol name="name">
				<anchored>
					<to>token</to>
					<position>righthigh</position>
					<offset>1,5</offset>
					<size>
						<width>90</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheettextsmall</font>
				<frame>
					<name>textline</name>
					<offset>0,1,0,0</offset>
				</frame>
				<script>
					function onValueChanged()
						window.token.setName(getValue());
						window.nameChanged();
					end
					
					function onDrag(button, x, y, draginfo)
						draginfo.setType("combattrackerentry");
						draginfo.setStringData(getValue());
						draginfo.setCustomData(window);
						return true;
					end
					
					function onInit()
						setHoverCursor("hand");
					end

					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);
							
							addBitmapWidget("indicator_linked").setPosition("bottomright", -5, -7);
						end
					end
				</script>
			</stringcontrol>
			
			<numbercontrol name="initresult">
				<anchored>
					<to>name</to>
					<position>righthigh</position>
					<offset>4,-5</offset>
					<size>
						<width>34</width>
						<height>23</height>
					</size>
				</anchored>
				<hideonvalue>0</hideonvalue>
				<font>sheetnumbersmall</font>
				<frame>
					<name>bonus</name>
					<offset>2,2,2,2</offset>
				</frame>
				<keyeditframe>
					<name>sheetfocus</name>
					<offset>2,2,2,2</offset>
				</keyeditframe>
				<script>
					function onValueChanged()
						window.windowlist.applySort();
					end
				</script>
				<tooltip>
					<text>Initiative</text>
				</tooltip>
			</numbercontrol>

			<numbercontrol name="sante">
				<anchored>
					<to>initresult</to>
					<position>right</position>
					<offset>5,0</offset>
					<size>
						<width>34</width>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<frame>
					<name>modifier</name>
					<offset>2,2,2,2</offset>
				</frame>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function onValueChanged()
						if linknode then
							linknode.setValue(getValue());
						end
					end
				
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);
							
							addBitmapWidget("indicator_linked").setPosition("bottomright", -5, -5);
						end
					end
				</script>
				<tooltip>
					<text>Points de Vie</text>
				</tooltip>
			</numbercontrol>
			
			
			<numbercontrol name="blessure_let">
				<anchored>
					<to>sante</to>
					<position>right</position>
					<offset>5,0</offset>
					<size>
						<width>34</width>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<frame>
					<name>modifier</name>
					<offset>2,2,2,2</offset>
				</frame>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function onValueChanged()
						if linknode then
							linknode.setValue(getValue());
						end
					end
				
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);							
							addBitmapWidget("indicator_linked").setPosition("bottomright", -5, -5);
						end
					end
				</script>
				<tooltip>
					<text>Points de Blessures LETALES</text>
				</tooltip>
			</numbercontrol>
			
			<numbercontrol name="blessure_nonlet">
				<anchored>
					<to>blessure_let</to>
					<position>right</position>
					<offset>5,0</offset>
					<size>
						<width>34</width>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<frame>
					<name>modifier</name>
					<offset>2,2,2,2</offset>
				</frame>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function onValueChanged()
						if linknode then
							linknode.setValue(getValue());
						end
					end
				
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);							
							addBitmapWidget("indicator_linked").setPosition("bottomright", -5, -5);
						end
					end
				</script>
				<tooltip>
					<text>Points de Blessures NON LETALES</text>
				</tooltip>
			</numbercontrol>
			
			<numbercontrol name="space">
				<anchored>
					<to>blessure_nonlet</to>
					<position>right</position>
					<offset>28,0</offset>
					<size>
						<width>34</width>
					</size>
				</anchored>
				<hideonvalue value="0" />
				<font>sheetnumbersmall</font>
				<frame>
					<name>modifier</name>
					<offset>2,2,2,2</offset>
				</frame>
				<script>
					function onInit()
						setValue(1);
					end					
					function onValueChanged()
						window.token.updateUnderlay();
					end
				</script>
				<tooltip>
					<text>Espace +++ EN CASE(S) +++</text>
				</tooltip>
			</numbercontrol>
			
			<numbercontrol name="reach">
				<anchored>
					<to>space</to>
					<position>right</position>
					<offset>25,0</offset>
					<size>
						<width>34</width>
					</size>					
				</anchored>
				<hideonvalue value="0" />
				<font>sheetnumbersmall</font>
				<frame>
					<name>modifier</name>
					<offset>2,2,2,2</offset>
				</frame>
				<script>
					function onInit()
						setValue(1);
					end
					
					function onValueChanged()
						window.token.updateUnderlay();
					end
				</script>
				<tooltip>
					<text>Allonge +++ EN CASE(S) +++</text>
				</tooltip>
			</numbercontrol>
			<genericcontrol>
				<anchored>
					<to>space</to>
					<position>left</position>
					<offset>2,0</offset>
					<size>
						<width>18</width>
					</size>
				</anchored>
				<icon>indicator_space</icon>
			</genericcontrol>
			<genericcontrol>
				<anchored>
					<to>reach</to>
					<position>left</position>
					<offset>2,0</offset>
					<size>
						<width>18</width>
					</size>
				</anchored>
				<icon>indicator_reach</icon>
			</genericcontrol>

			<!----------------------------------------------------------------------- Icone Ami/Ennemi/Neutre -->
			<genericcontrol name="friendfoe">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>380</offset>
					</left>
					<top>
						<parent>name</parent>
						<anchor>top</anchor>
						<offset>-3</offset>
					</top>					
					<size>
						<width>20</width>
						<height>20</height>
					</size>
				</anchored>
				<icon>indicator_ctffempty</icon>
				<stateicons>
					<friend>indicator_ctfffriend</friend>
					<neutral>indicator_ctffneutral</neutral>
					<foe>indicator_ctfffoe</foe>
				</stateicons>
				<script>
					function onDrop(x, y, draginfo)
						if draginfo.isType("combattrackerff") then
							state = draginfo.getStringData();
							window.setFoF(state);
							setIcon(stateicons[1][state][1]);
						end
					end
					
					function setState(s)
						state = s;
						window.setFoF(state);
						if stateicons[1][state] then
							setIcon(stateicons[1][state][1]);
						else
							setIcon(icon[1]);
						end
					end
				</script>
			</genericcontrol>
			
			
			<!----------------------------------------------------------------------------------------------------- 2ème ligne -->
			<!----------------------------------------------------------------------- Defense -->
			<numbercontrol name="defense">
				<anchored>					
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>55</offset>
					</left>
					<top>
						<parent>name</parent>
						<offset>5</offset>						
					</top>
					<size>
						<width>40</width>
						<height>15</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>				
				<frame>
					<name>textlinesmall</name>
					<offset>0,-1,0,0</offset>
				</frame>
				<description>
					<text>Valeur de Défense</text>
				</description>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);
							
							addBitmapWidget("indicator_linked").setPosition("bottomright", 0, -3);

							setReadOnly(true);
						end
					end
				</script>
			</numbercontrol>
			<stringcontrol name="defenselabel">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>15</offset>
					</left>							
					<top>
						<parent>name</parent>						
						<offset>7</offset>	
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Défense</static>
			</stringcontrol>
			
			<!-----------------------------------------------------------------------Corps -->
			<numbercontrol name="corps">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>190</offset>
					</left>
					<top>						
						<parent>name</parent>						
						<offset>5</offset>								
					</top>
					<size>
						<width>40</width>
						<height>15</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<displaysign />
				<frame>
					<name>textlinesmall</name>
					<offset>0,-1,0,0</offset>
				</frame>
				<description>
					<text>Valeur de Corps</text>
				</description>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);							
							addBitmapWidget("indicator_linked").setPosition("bottomright", 0, -3);
							setReadOnly(true);
						end
					end
				</script>
			</numbercontrol>
			<stringcontrol name="corpslabel">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>110</offset>
					</left>					
					<top>
						<parent>name</parent>						
						<offset>7</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Corps/Etourdis.</static>
			</stringcontrol>
			
			<!-----------------------------------------------------------------------Dexterité -->
			<numbercontrol name="dexterite">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>300</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>5</offset>		
					</top>
					<size>
						<width>40</width>
						<height>15</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<displaysign />
				<frame>
					<name>textlinesmall</name>
					<offset>0,-1,0,0</offset>
				</frame>
				<description>
					<text>Valeur de Dextérité</text>
				</description>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);
							
							addBitmapWidget("indicator_linked").setPosition("bottomright", 0, -3);

							setReadOnly(true);
						end
					end
				</script>
			</numbercontrol>
			<stringcontrol name="dexteritelabel">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>250</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>7</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Dextérité</static>
			</stringcontrol>
			
			<!-----------------------------------------------------------------------Taille -->
			<numbercontrol name="taille">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>390</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>5</offset>		
					</top>
					<size>
						<width>40</width>
						<height>15</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<displaysign />
				<frame>
					<name>textlinesmall</name>
					<offset>0,-1,0,0</offset>
				</frame>
				<description>
					<text>Valeur de Taille</text>
				</description>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);
							
							addBitmapWidget("indicator_linked").setPosition("bottomright", 0, -3);

							setReadOnly(true);
						end
					end
				</script>
			</numbercontrol>			
			<stringcontrol name="taillelabel">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>360</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>7</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Taille</static>
			</stringcontrol>		
			
			<!----------------------------------------------------------------------------------------------------- 3ème ligne -->
			<!----------------------------------------------------------------------- Déplacement -->
			<numbercontrol name="deplacement">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>80</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>25</offset>		
					</top>
					<size>
						<width>40</width>
						<height>15</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>				
				<frame>
					<name>textlinesmall</name>
					<offset>0,-1,0,0</offset>
				</frame>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);
							
							addBitmapWidget("indicator_linked").setPosition("bottomright", 0, -3);

							setReadOnly(true);
						end
					end
				</script>				
			</numbercontrol>
			<stringcontrol name="deplacementlabel">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>15</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>27</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Déplacement</static>
			</stringcontrol>
			
			
			<!----------------------------------------------------------------------- Initiative -->
			<numbercontrol name="initiative">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>230</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>25</offset>		
					</top>
					<size>
						<width>40</width>
						<height>15</height>
					</size>
				</anchored>
				<font>sheetnumbersmall</font>
				<displaysign />
				<frame>
					<name>textlinesmall</name>
					<offset>0,-1,0,0</offset>
				</frame>
				<script>
					function onLinkUpdated(source)
						setValue(source.getValue());
					end
					
					function setLink(dbnode)
						if dbnode then
							linknode = dbnode;
							linknode.onUpdate = onLinkUpdated;
							onLinkUpdated(linknode);							
							addBitmapWidget("indicator_linked").setPosition("bottomright", 0, -3);
							setReadOnly(true);
						end
					end
				</script>		
			</numbercontrol>
			<stringcontrol name="initiativelabel">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>180</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>27</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Initiative</static>
			</stringcontrol>
			
			<!----------------------------------------------------------------------------------------------------- 4ème ligne -->
			<!----------------------------------------------------------------------- Arme1 -->
			<stringcontrol name="arme1">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>55</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>45</offset>		
					</top>
					<size>
						<width>370</width>
						<height>17</height>
					</size>
				</anchored>
				<font>sheettextsmall</font>				
				<frame>
					<name>textline</name>
					<offset>0,1,0,0</offset>
				</frame>				
			</stringcontrol>			
			<stringcontrol name="arme1label">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>15</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>47</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Arme 1</static>
			</stringcontrol>
			
			<!----------------------------------------------------------------------- Arme2 -->
			<stringcontrol name="arme2">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>55</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>65</offset>		
					</top>
					<size>
						<width>370</width>
						<height>17</height>
					</size>
				</anchored>
				<font>sheettextsmall</font>				
				<frame>
					<name>textline</name>
					<offset>0,1,0,0</offset>
				</frame>				
			</stringcontrol>			
			<stringcontrol name="arme2label">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>15</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>67</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Arme 2</static>
			</stringcontrol>
			
			<!----------------------------------------------------------------------- Arme3 -->
			<stringcontrol name="arme3">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>55</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>85</offset>		
					</top>
					<size>
						<width>370</width>
						<height>17</height>
					</size>
				</anchored>
				<font>sheettextsmall</font>				
				<frame>
					<name>textline</name>
					<offset>0,1,0,0</offset>
				</frame>				
			</stringcontrol>			
			<stringcontrol name="arme3label">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>15</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>87</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Arme 3</static>
			</stringcontrol>
			
			<!----------------------------------------------------------------------- Arme4 -->
			<stringcontrol name="arme4">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>55</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>105</offset>		
					</top>
					<size>
						<width>370</width>
						<height>17</height>
					</size>
				</anchored>
				<font>sheettextsmall</font>				
				<frame>
					<name>textline</name>
					<offset>0,1,0,0</offset>
				</frame>				
			</stringcontrol>			
			<stringcontrol name="arme4label">
				<anchored>
					<left>
						<parent>name</parent>
						<anchor>left</anchor>
						<offset>15</offset>
					</left>
					<top>
						<parent>name</parent>						
						<offset>107</offset>		
					</top>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Arme 4</static>
			</stringcontrol>
			
			
			
			
			
			
			
			
			
			<!----------------------------------------------------------------------------------------------------- -->
			<windowreferencecontrol name="link">
				<anchored>
					<right>
						<anchor>right</anchor>
						<offset>-6</offset>
					</right>
					<top>
						<anchor>top</anchor>
						<offset>7</offset>
					</top>
					<size>
						<width>20</width>
						<height>20</height>
					</size>
				</anchored>
				<icon>
					<normal>button_dragtarget</normal>
				</icon>
				<class>npc</class>
				<invisible />
			</windowreferencecontrol>
			
			

			<genericcontrol name="targeting">
				<anchored>
					<right>
						<anchor>right</anchor>
						<offset>-6</offset>
					</right>
					<top>
						<parent>name</parent>
						<anchor>bottom</anchor>
						<relation>current</relation>
					</top>
					<size>
						<width>100</width>
						<height>20</height>
					</size>
				</anchored>
				<iconspacing>21</iconspacing>
				<script file="scripts/combattracker_targeting.lua" />
			</genericcontrol>



			<!-- Spacer -->
			<genericcontrol name="spacer">
				<anchored>
					<top>
						<parent>name</parent>
						<anchor>bottom</anchor>
						<relation>current</relation>
					</top>
					<left>
						<anchor>left</anchor>
					</left>
					<right>
						<anchor>right</anchor>
					</right>
					<size>
						<height>10</height>
					</size>
				</anchored>
				<invisible />
				<disabled />
			</genericcontrol>

			<genericcontrol name="active">
				<anchored>
					<top>
						<anchor>top</anchor>
					</top>
					<bottom>
						<anchor>bottom</anchor>
					</bottom>
					<left>
						<anchor>left</anchor>
					</left>
					<size>
						<width>33</width>
					</size>
				</anchored>
				<icon>indicator_ctpassive</icon>
				<activeicon>indicator_ctactive</activeicon>
				<script file="scripts/combattracker_active.lua" />
			</genericcontrol>
		</sheetdata>
	</windowclass>

	<windowclass name="combattracker">
		<frame>ctbox</frame>
		<placement>
			<size>
				<width>527</width>
				<height>512</height>
			</size>
		</placement>
		<sizelimits>
			<minimum>
				<height>210</height>
			</minimum>
			<dynamic>
				<resize>vertical</resize>
			</dynamic>
		</sizelimits>
		<sheetdata>
			<stringcontrol>
				<bounds>60,14,30,12</bounds>
				<font>sheetlabelsmall</font>
				<color>#ffffffff</color>
				<static>Nom</static>
			</stringcontrol>
			<stringcontrol>
				<bounds>158,14,20,12</bounds>
				<font>sheetlabelsmall</font>
				<color>#ffffffff</color>
				<static>Init</static>
			</stringcontrol>
			<stringcontrol>
				<bounds>230,14,25,12</bounds>
				<font>sheetlabelsmall</font>
				<color>#ffffffff</color>
				<static>Santé</static>
			</stringcontrol>
			

			<windowlist name="list">
				<class>combattracker_entry</class>
				<allowcreate />
				<allowdelete />
				<bounds>0,30,-20,-50</bounds>

				<acceptdrop class="mini_charsheet" fields="name,#sante" />
				<acceptdrop class="charsheet" fields="name,#sante" />
				<acceptdrop class="npc" fields="name,sante" />
				<acceptdrop class="monster" fields="name,sante" />
				
				<script file="scripts/combattracker.lua" />
			</windowlist>

			<scrollercontrol>
				<anchored>
					<to>list</to>
					<position>insidebottomright</position>
					<size>
						<width>45</width>
						<height>27</height>
					</size>
				</anchored>
				<target>list</target>
				<button>
					<normal>button_scroller</normal>
					<pressed>button_scroller_down</pressed>
				</button>
			</scrollercontrol>
			
			<genericcontrol>
				<bounds>28,-53,33,40</bounds>
				<activeicon>indicator_ctactive</activeicon>
				<script>
					function onInit()
						widget = addBitmapWidget(activeicon[1]);
						setHoverCursor("hand");
					end
					
					function onDrag(button, x, y, draginfo)
						draginfo.setType("combattrackeractivation");
						draginfo.setIcon(activeicon[1]);
						widget.setVisible(false);
						
						return true;
					end
					
					function onDragEnd(draginfo)
						widget.setVisible(true);
					end
				</script>
			</genericcontrol>
			<buttoncontrol>
				<bounds>62,-45,33,26</bounds>
				<icon>
					<normal>button_ctnextactor</normal>
					<pressed>button_ctnextactor_down</pressed>
				</icon>
				<tooltip>
					<text>Acteur suivant</text>
				</tooltip>
				<script>
					function onButtonPress()
						window.list.nextActor();
					end
					
					function onDrag(button, x, y, draginfo)
						draginfo.setType("combattrackernextactor");
						draginfo.setIcon(icon[1].normal[1]);
						return true;
					end
				</script>
			</buttoncontrol>

			<combattrackerffsource>
				<bounds>200,-43,20,20</bounds>
				<icon>indicator_ctfffriend</icon>
				<value>friend</value>
				<tooltip>
					<text>Ami</text>
				</tooltip>
			</combattrackerffsource>
			<combattrackerffsource>
				<bounds>227,-43,20,20</bounds>
				<icon>indicator_ctffneutral</icon>
				<value>neutral</value>
				<tooltip>
					<text>Neutre</text>
				</tooltip>
			</combattrackerffsource>
			<combattrackerffsource>
				<bounds>254,-43,20,20</bounds>
				<icon>indicator_ctfffoe</icon>
				<value>foe</value>
				<tooltip>
					<text>Hostile</text>
				</tooltip>
			</combattrackerffsource>
			
			<stringcontrol name="roundcounterlabel">
				<bounds>360,-39,50,15</bounds>
				<font>sheetlabel</font>
				<color>#ffffffff</color>
				<static>Round</static>
			</stringcontrol>
			<numbercontrol name="roundcounter">
				<anchored>
					<to>roundcounterlabel</to>
					<position>righthigh</position>
					<offset>0,-6</offset>
					<size>
						<width>40</width>
						<height>25</height>
					</size>
				</anchored>
				<frame>
					<name>modifier</name>
					<offset>3,3,3,3</offset>
				</frame>
				<font>sheetnumber</font>
			</numbercontrol>
			<buttoncontrol>
				<anchored>
					<to>roundcounter</to>
					<position>righthigh</position>
					<offset>5,0</offset>
					<size>
						<width>33</width>
						<height>26</height>
					</size>
				</anchored>
				<icon>
					<normal>button_ctnextround</normal>
					<pressed>button_ctnextround_down</pressed>
				</icon>
				<tooltip>
					<text>Round suivant</text>
				</tooltip>
				<script>
					function onButtonPress()
						window.list.nextRound();
					end
					
					function onDrag(button, x, y, draginfo)
						draginfo.setType("combattrackernextround");
						draginfo.setIcon(icon[1].normal[1]);
						return true;
					end
				</script>
			</buttoncontrol>
		</sheetdata>
	</windowclass>
</root>
