<data>
	<canvases>
		<!-- CLASSES TEMPLATE -->
		<canvasTemplate r_name="'basicClassTemplate'" r_template="'mainCanvasTemplate'"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										localClassName="r_name"
										classDisplayName="localClassName"
										classExists="exists(selectedHero.packages.(attributeByName(localClassName)))"
										classTooltip="classExists?(selectedHero.packages.(attributeByName(localClassName)).tooltip):(text.tooltipClassNotAccessible)"
										classGraphic="classExists?(selectedHero.packages.(attributeByName(localClassName)).r_graphic):'noclasse.png'"
										classLevel="selectedHero.packages.(attributeByName(localClassName)).classLevel"
										classCanBeUpgrade="classExists?(selectedHero.packages.(attributeByName(localClassName)).canBeUpgrade):0"
										selection="localClassName==currentClass"
										pictureScale="1">
			<canvas r_name="'pictures'" r_template="'mainCanvasTemplate'"
							r_graphic="'rngsdk.display.CdplSpriteSimple'"
							r_scaleX="pictureScale"
							r_scaleY="pictureScale">
				<picture r_name="'classPicture'" r_template="'mainPictureTemplate'" r_graphic="classGraphic"/>
				<picture r_name="'classSelected'" r_template="'mainPictureTemplate'" r_graphic="'selectedClass'" r_visible="selection"/>
				<picture r_name="'levelUP'" r_template="'mainPictureTemplate'" r_graphic="'levelup.png'" rw_xPos="22" rw_yPos="36" r_visible="classCanBeUpgrade"/>
			</canvas>
			<text r_name="'className'" r_template="'mainTextFieldTemplate'" textSize="15*pictureScale" rw_xPos="10+54*pictureScale" rw_yPos="12*pictureScale" r_width="sectionWidth-20-rw_xPos" r_height="w_textHeight+4" r_text="classExists?classDisplayName:'? ? ? ? ?'" r_align="'left'"/>
			<text r_name="'classLevel'" r_template="'mainTextFieldTemplate'" textSize="15*pictureScale" rw_xPos="10+54*pictureScale" rw_yPos="12*pictureScale" r_width="sectionWidth-20-rw_xPos" r_height="w_textHeight+4" r_text="classExists?classLevel:''" r_align="'right'"/>
			<button r_name="'activation'" r_template="'mainButtonTemplate'" r_graphic="'vwInvisibleLayer'" r_height="54*pictureScale" r_width="sectionWidth-20">
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="localClassName"/>
			</button>
		</canvasTemplate>
		
		<!-- POWER SLOT TEMPLATES -->
		<canvasTemplate r_name="'powerSlotTemplate'" r_template="'mainCanvasTemplate'"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										refreshSlotTarget="r_name"
										powerSelectedName="('P'+slotIndex)"
										powerName="''"
										isEnabled="1"
										isActive="1">
			<picture r_name="'backgroundPowerPicture'" r_template="'mainPictureTemplate'" r_graphic="isEnabled?(isActive?'SkillFrame1.png':'SkillFramePassive.png'):'SkillFrame2.png'"/>
			<slot r_name="'powerSlot'" r_template="'mainSlotTemplate'"
						r_enabled="exists(content)&&content.r_enabled&&isActive"
						r_graphic="'vwSlotLayer48'"
						rw_xPos="6"
						rw_yPos="6"
						r_slotType="'power'"
						r_powerName="powerName"
						r_acceptDrop="0">
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="globalHMISelection=powerSelectedName"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				<event r_name="'onContent'" r_template="'mainEventTemplate'" r_eventTarget="'content'" r_targetType="'evaluator'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<modifier r_name="'isActive'" r_template="'mainModifierTemplate'" r_modifierTarget="'isActive'" r_modifiedValue="exists(content)&&exists(content.action)"/>
				<modifier r_name="'isEnabled'" r_template="'mainModifierTemplate'" r_modifierTarget="'isEnabled'" r_modifiedValue="exists(content)&&content.r_enabled"/>
			</slot>
			<picture r_name="'selected'" r_template="'mainPictureTemplate'"
							 r_visible="globalHMISelection==powerSelectedName"
							 r_graphic="'slotCurrent.png'"
							 rw_xPos="6"
							 rw_yPos="6">
				<event r_name="'globalHMISelectionChange'" r_template="'mainEventTemplate'" r_eventTarget="'globalHMISelection'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</picture>								 
		</canvasTemplate>
		
		<!-- ACTION SLOT TEMPLATES -->
		<canvasTemplate r_name="'actionSlotCanvasTemplate'" r_template="'mainCanvasTemplate'"
										refreshSlotTarget="r_name"
										slotIndex="0"
										isSelected="0"
										isDefault="0"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										chargeLeft="0"
										r_canExecute="1">
			<picture r_name="'backgroundActionPicture'" r_template="'mainPictureTemplate'" r_graphic="r_canExecute?'SkillFrame1.png':'SkillFrame2.png'"/>
			<slot r_name="'actionSlot'" r_template="'mainSlotTemplate'"
						r_enabled="exists(content)&&w_isInDungeon&&!isPaused"
						r_graphic="'vwSlotLayer48'"
						rw_xPos="6"
						rw_yPos="6"
						r_slotType="'action'"
						r_slotIndex="slotIndex">
				<event r_name="'onContent'" r_template="'mainEventTemplate'" r_eventTarget="'content'" r_targetType="'evaluator'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<event r_name="'onContentCharge'" r_template="'mainEventTemplate'" r_enabled="exists(content)&&exists(content.rw_charge)" r_eventTarget="'content.rw_charge'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'ROLL_OVER'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER+'" r_effect="globalHMISelection=('A'+slotIndex)"/>
					<effect r_name="'ROLL_OUT'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="globalHMISelection=-1"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<!-- can un-select another action -->
				<modifier r_name="'isSelected'" r_template="'mainModifierTemplate'" r_modifierTarget="'isSelected'" r_modifiedValue="$0||((exists(nextHero)&&exists(content)&&exists(nextHero.w_nextAction))?(content==nextHero.w_nextAction):0)"/>
				<modifier r_name="'isDefault'" r_template="'mainModifierTemplate'" r_modifierTarget="'isDefault'" r_modifiedValue="(exists(nextHero)&&exists(content)&&exists(nextHero.defaultNextAction))?(content==nextHero.defaultNextAction):0"/>
				<modifier r_name="'chargeLeft'" r_template="'mainModifierTemplate'" r_modifierTarget="'chargeLeft'" r_modifiedValue="(exists(content)&&exists(content.rw_charge))?(content.rw_charge):0"/>
				<modifier r_name="'canExecute'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canExecute'" r_modifiedValue="!exists(content)||(exists(nextHero)&&exists(content.action)&&content.action.r_canExecute)"/>
			</slot>
			<picture r_name="'selected'" r_template="'mainPictureTemplate'"
							 r_visible="isSelected||isDefault||(globalHMISelection==('A'+slotIndex))"
							 r_graphic="isDefault?'slotDefault.png':'slotCurrent.png'"
							 rw_xPos="6"
							 rw_yPos="6">
				<event r_name="'selectionChange'" r_template="'mainEventTemplate'" r_eventTarget="'isSelected'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
				<event r_name="'globalHMISelectionChange'" r_template="'mainEventTemplate'" r_eventTarget="'globalHMISelection'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</picture>
			<text r_name="'chargeLeft'" r_template="'mainTextFieldTemplate'"
						r_visible="chargeLeft>0"
						rw_xPos="6"
						rw_yPos="6"
						r_width="32"
						r_height="32"
						r_text="chargeLeft"
						textSize="7"
						r_textColor="16777215"/>
		</canvasTemplate>
	
		<!-- EQUIPMENT SLOT TEMPLATE -->
		<canvasTemplate r_name="'equipmentSlotTemplate'" r_template="'mainCanvasTemplate'"
										refreshSlotTarget="r_name"
										slotName="''"
										slotBackground="'playerstuff_standard.png'"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										chargeLeft="0"
										equippedPenalty="0"
										magicLevel="0"
										contentExists="1">
			<picture r_name="'backgroundEquipmentPicture'" r_template="'mainPictureTemplate'" r_graphic="contentExists?'playerstuff_standard.png':slotBackground"/>
			<slot r_name="'equipmentSlot'" r_template="'mainSlotTemplate'"
						r_graphic="{'vwEmptyLayer32','slot_vert.png','slot_bleu.png','slot_violet.png','slot_gold.png'}[magicLevel]"
						r_slotType="'equipment'"
						r_slotName="slotName"
						rw_xPos="0"
						rw_yPos="0">
				<event r_name="'onContent'" r_template="'mainEventTemplate'" r_eventTarget="'content'" r_targetType="'evaluator'">
					<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="globalHMISelection=slotName"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'ROLL_OVER'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER+'" r_effect="globalHMISelection=slotName"/>
					<effect r_name="'ROLL_OUT'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT+'" r_effect="globalHMISelection=-1"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="globalHMISelection=slotName"/>
				<modifier r_name="'chargeLeft'" r_template="'mainModifierTemplate'" r_modifierTarget="'chargeLeft'" r_modifiedValue="(exists(content)&&exists(content.rw_charge))?(content.rw_charge):0"/>
				<modifier r_name="'equippedPenalty'" r_template="'mainModifierTemplate'" r_modifierTarget="'equippedPenalty'" r_modifiedValue="(exists(content)&&exists(content.equippedPenalty))?(content.equippedPenalty):0"/>
				<modifier r_name="'magicLevel'" r_template="'mainModifierTemplate'" r_modifierTarget="'magicLevel'" r_modifiedValue="(exists(content)&&exists(content.properties))?(content.magicLevel):0"/>
				<modifier r_name="'contentExists'" r_template="'mainModifierTemplate'" r_modifierTarget="'contentExists'" r_modifiedValue="exists(content)"/>
			</slot>
			<picture r_name="'penaltyGraphic'" r_template="'mainPictureTemplate'" r_graphic="'slot_malus.png'" r_visible="equippedPenalty>0"/>
			<picture r_name="'selected'" r_template="'mainPictureTemplate'"
							 r_visible="globalHMISelection==slotName"
							 r_graphic="'slotCurrent.png'"
							 rw_xPos="0"
							 rw_yPos="0">
				<event r_name="'selectionChange'" r_template="'mainEventTemplate'" r_eventTarget="'globalHMISelection'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</picture>								 
			<text r_name="'chargeLeft'" r_template="'mainTextFieldTemplate'"
						r_visible="chargeLeft>0"
						r_width="32"
						r_height="32"
						rw_xPos="0"
						rw_yPos="0"
						r_text="chargeLeft"
						textSize="7"
						r_textColor="16777215"/>
		</canvasTemplate>
		
		<!-- INVENTORY SLOT TEMPLATE -->
		<canvasTemplate r_name="'inventorySlotTemplate'" r_template="'mainCanvasTemplate'"
										refreshSlotTarget="r_name"
										slotIndex="0"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										chargeLeft="0"
										magicLevel="0">
			<slot r_name="'inventorySlot'" r_template="'mainSlotTemplate'"
						r_graphic="{'vwEmptyLayer32','slot_vert.png','slot_bleu.png','slot_violet.png','slot_gold.png'}[magicLevel]"
						r_slotType="'inventory'"
						r_slotIndex="slotIndex"
						rw_xPos="0"
						rw_yPos="0"
						dropOnClick="0">
				<event r_name="'onContent'" r_template="'mainEventTemplate'" r_eventTarget="'content'" r_targetType="'evaluator'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'ROLL_OVER'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER+'" r_effect="globalHMISelection=('I'+slotIndex)"/>
					<effect r_name="'ROLL_OUT'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT+'" r_effect="globalHMISelection=-1"/>
					<effect r_name="'CLICK'" r_template="'mainSelfEffectTemplate'" r_enabled="w_userEvent=='CLICK'&&dropOnClick" r_type="w_isInDungeon?'DropContent':'DestroyContent'"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<effect r_name="'selection'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="globalHMISelection=('I'+slotIndex)"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				<modifier r_name="'chargeLeft'" r_template="'mainModifierTemplate'" r_modifierTarget="'chargeLeft'" r_modifiedValue="(exists(content)&&exists(content.rw_charge))?(content.rw_charge):0"/>
				<modifier r_name="'magicLevel'" r_template="'mainModifierTemplate'" r_modifierTarget="'magicLevel'" r_modifiedValue="(exists(content)&&exists(content.properties))?(content.magicLevel):0"/>
			</slot>
			<picture r_name="'selected'" r_template="'mainPictureTemplate'"
							 r_visible="globalHMISelection==('I'+slotIndex)"
							 r_graphic="'slotCurrent.png'"
							 rw_xPos="0"
							 rw_yPos="0">
				<event r_name="'selectionChange'" r_template="'mainEventTemplate'" r_eventTarget="'globalHMISelection'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</picture>
			<text r_name="'chargeLeft'" r_template="'mainTextFieldTemplate'"
						r_visible="chargeLeft>0"
						r_width="32"
						r_height="32"
						rw_xPos="0"
						rw_yPos="0"
						r_text="chargeLeft"
						textSize="7"
						r_textColor="16777215"/>
		</canvasTemplate>
		
		<!-- DROP SLOT TEMPLATE -->
		<canvasTemplate r_name="'dropSlotCanvasTemplate'" r_template="'mainCanvasTemplate'"
										refreshSlotTarget="r_name"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										dropOnClick="0">
			<slot r_name="'dropSlot'" r_template="'mainSlotTemplate'"
						r_graphic="'dropIcon.png'"
						r_enabled="1"
						r_slotType="'remove'">
				<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'ROLL_OVER'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER+'" r_effect="globalHMISelection='drop'"/>
					<effect r_name="'ROLL_OUT'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="globalHMISelection=-1"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
			</slot>
			<picture r_name="'selected'" r_template="'mainPictureTemplate'"
							 r_visible="dropOnClick||(globalHMISelection=='drop')"
							 r_graphic="dropOnClick?'slotDefault.png':'slotCurrent.png'">
				<event r_name="'selectionChange'" r_template="'mainEventTemplate'" r_eventTarget="'globalHMISelection'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</picture>
		</canvasTemplate>		
		<canvasTemplate r_name="'dropSlot32Template'" r_template="'dropSlotCanvasTemplate'"/>
		<canvasTemplate r_name="'dropSlot44Template'" r_template="'dropSlotCanvasTemplate'">
			<slot r_name="'dropSlot'" r_graphic="'vwDropIcon'"/>
			<slot r_name="'selected'" rw_xPos="6" rw_yPos="6"/>
		</canvasTemplate>
		
		<!-- DURABLE EFFECT TEMPLATE -->
		<canvasTemplate r_name="'durableEffectSlotCanvasTemplate'" r_template="'mainCanvasTemplate'"
										slotName="r_name"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										timeLeft="-1"
										chargeLeft="0"
										slotIndex="0">
			<slot r_name="'durableEffectSlot'" r_template="'mainSlotTemplate'"
						r_graphic="'rngsdk.display.CdplSpriteSimple'"
						r_slotType="'durableEffect'"
						r_slotIndex="slotIndex"
						r_slotName="slotName"
						w_userEvent="">
				<event r_name="'onContentCharge'" r_template="'mainEventTemplate'" r_enabled="exists(content)&&exists(content.rw_charge)" r_eventTarget="'content.rw_charge'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="slotName"/>
				</event>
				<event r_name="'onUserEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'cancel'" r_template="'mainSelfEffectTemplate'" r_enabled="exists(content)&&content.cancellable&&(w_userEvent=='CLICK')" r_type="'DestroyContent'"/>
				</event>
				<modifier r_name="'timeLeft'" r_template="'mainModifierTemplate'" r_enabled="exists(content)" r_modifierTarget="'timeLeft'" r_modifiedValue="(exists(nextHero)&&(content.r_tickDuration>0))?round((content.endTime-nextHero.rw_currentTime)/100):-1"/>
				<modifier r_name="'chargeLeft'" r_template="'mainModifierTemplate'" r_modifierTarget="'chargeLeft'" r_modifiedValue="(exists(content)&&exists(content.rw_charge))?(content.rw_charge):0"/>
			</slot>
			<text r_name="'timeLeft'" r_template="'mainTextFieldTemplate'"
						r_visible="timeLeft>=0"
						r_text="timeLeft"
						textSize="10"
						rw_xPos="-64"
						rw_yPos="32-w_textHeight"
						r_textColor="16777215"
						r_align="'right'"
						r_width="64"/>
			<text r_name="'chargeLeft'" r_template="'mainTextFieldTemplate'"
						r_visible="chargeLeft>0"
						r_width="32"
						r_height="32"
						r_text="chargeLeft"
						textSize="10"
						r_textColor="16777215"/>
		</canvasTemplate>		
	</canvases>
</data>