<data>
	<!-- SUB CONTROLS TEMPLATE -->
	<texts>
		<textTemplate r_name="'mainTextTemplate'" r_visible="1" r_existingGraphic="''" r_graphic="''" r_mouseEnabled="0" r_doubleClickEnabled="0" r_letterSpacing="0" r_leading="0" r_font="r_font=globalParameters.static.fontName" w_textWidth="0" w_textHeight="0"/>
		<textTemplate r_name="'mainTextFieldTemplate'" r_template="'mainTextTemplate'" r_graphic="'rngsdk.display.CdplTextSimple'" r_textColor="0" r_width="100" r_height="textSize+4" textSize="10" r_textSize="round(textSize*1)"/>
	</texts>
	<inputs>
		<inputTemplate r_name="'mainInputTemplate'" r_visible="1" r_enabled="1" r_existingGraphic="''" r_graphic="''" r_mouseEnabled="1" r_selectable="1" r_doubleClickEnabled="0" r_textColor="16777215" r_letterSpacing="0" r_leading="0" r_font="r_font=globalParameters.static.fontName" rw_text="''" w_textWidth="0" w_textHeight="0" textSize="10" r_textSize="round(textSize*0.75)"/>
		<inputTemplate r_name="'mainInputFieldTemplate'" r_template="'mainInputTemplate'" r_graphic="'rngsdk.display.CdplTextSimple'" r_textType="'INPUT'"/>
	</inputs>
	<pictures>
		<pictureTemplate r_name="'mainPictureTemplate'" r_visible="1" r_existingGraphic="''" r_graphic="''" r_mouseEnabled="0" r_doubleClickEnabled="0"/>
	</pictures>
	<buttons>
		<buttonTemplate r_name="'mainButtonTemplate'" r_visible="1" r_enabled="1" r_existingGraphic="''" r_graphic="''" r_mouseEnabled="1" r_doubleClickEnabled="1" w_userEvent=""/>
		<buttonTemplate r_name="'stateButtonTemplate'" r_template="'mainButtonTemplate'" w_isDown="0" r_graphic="w_isDown?downGraphic:upGraphic" downGraphic="''" upGraphic="''">
			<event r_name="'isDown'" r_template="'mainEventTemplate'" r_eventTarget="'w_isDown'" r_targetType="'attribute'">
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
			</event>
		</buttonTemplate>
	</buttons>
	<slots>
		<slotTemplate r_name="'mainSlotTemplate'" r_visible="1" r_enabled="exists(content)" r_existingGraphic="''" r_graphic="''" r_mouseEnabled="1" r_doubleClickEnabled="1" r_acceptDrop="1" w_userEvent=""/>
	</slots>
	
	<!-- CANVASES -->
	<canvases>
		<!-- MAIN TEMPLATE -->
		<canvasTemplate r_name="'mainCanvasTemplate'" r_visible="1" w_loaded="0" r_existingGraphic="''" r_graphic="''" r_mouseEnabled="0" r_doubleClickEnabled="0"/>

		<!-- CAPSULES -->
		<canvasTemplate r_name="'capsuleGraphicsTemplate'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'">
			<picture r_name="'background'" r_template="'mainPictureTemplate'" r_graphic="buttonIsDown?'button9_1':(activation?(selection?'button9_1':'button9_0'):'button9_2')" r_width="capsuleWidth" r_height="capsuleHeight"/>
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleTemplate'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'" activation="1" selection="0" buttonIsDown="0" scale="1" capsuleWidth="200" capsuleHeight="50">
			<canvas r_name="'capsuleGraphics'" r_template="'capsuleGraphicsTemplate'" r_graphicName="'capsuleBackground'"/>
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleTextTemplate'" r_template="'capsuleTemplate'" capsuleText="''" centeredText="0">
			<text r_name="'capsuleText'" r_template="'mainTextFieldTemplate'" r_text="capsuleText" rw_xPos="16" rw_yPos="(capsuleHeight-r_height)/2" r_width="capsuleWidth-32" r_height="centeredText?(w_textHeight+4):(capsuleHeight-20)" textSize="10*scale" r_align="'center'" multiline="!centeredText" r_wordWrap="!centeredText" />
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleDarkTextTemplate'" r_template="'capsuleTextTemplate'">
			<canvas r_name="'capsuleGraphics'">
				<picture r_name="'background'" r_graphic="'button9_dark'"/>
			</canvas>
			<text r_name="'capsuleText'" r_textColor="10403071"/>
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleSimpleButtonTemplate'" r_template="'capsuleTextTemplate'" buttonName="r_name" centeredText="1">
			<button r_name="'capsuleButton'" r_template="'stateButtonTemplate'" r_existingGraphic="'capsuleBackground'">
				<event r_name="'isDown'">
					<effect r_name="'graphicRefresh'" r_refreshTarget="buttonName"/>
				</event>
				<modifier r_name="'buttonIsDown'" r_template="'mainModifierTemplate'" r_modifierTarget="'buttonIsDown'" r_modifiedValue="w_isDown"/>
			</button>
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleButtonTemplate'" r_template="'capsuleSimpleButtonTemplate'" capsuleEffect="''">
			<button r_name="'capsuleButton'">
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="capsuleEffect"/>
			</button>
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleInputTemplate'" r_template="'capsuleTemplate'" capsuleWidth="200" capsuleHeight="50" capsuleEffect="''" activation="1" selection="0" initialInputText="''" inputText="">
			<picture r_name="'capsuleInputBack'" r_template="'mainPictureTemplate'" r_graphic="'vwBlackLayer'" rw_xPos="15" rw_yPos="(capsuleHeight-r_height)/2" r_width="capsuleWidth-30" r_height="24*scale"/>
			<input r_name="'capsuleInput'" r_template="'mainInputFieldTemplate'" rw_text="rw_text=initialInputText" rw_xPos="20" rw_yPos="(capsuleHeight-w_textHeight-4)/2" r_width="capsuleWidth-40" r_height="w_textHeight+4" textSize="10*scale">
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','multiEffect'}">
					<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="capsuleEffect"/>
				</effect>
				<modifier r_name="'inputText'" r_template="'mainModifierTemplate'" r_modifierTarget="'inputText'" r_modifiedValue="rw_text"/>
			</input>
		</canvasTemplate>
		<canvasTemplate r_name="'capsuleInputWithTextTemplate'" r_template="'capsuleInputTemplate'" labelSize="90*scale" capsuleLabel="''">
			<picture r_name="'capsuleInputBack'" rw_xPos="labelSize" r_width="capsuleWidth-labelSize-15"/>
			<input r_name="'capsuleInput'" rw_xPos="labelSize" r_width="capsuleWidth-labelSize-10"/>
			<text r_name="'capsuleLabel'" r_template="'mainTextFieldTemplate'" r_text="capsuleLabel" rw_xPos="20" rw_yPos="(capsuleHeight-w_textHeight-4)/2" r_width="labelSize" r_height="w_textHeight+4" textSize="10*scale"/>
		</canvasTemplate>
		
		<!-- MASKED ZONE -->
		<canvas r_name="'maskedZone'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'" innerHeight="0" innerWidth="0" outerHeight="0" outerWidth="0" leftTouched="0" upTouched="0" rightTouched="0" downTouched="0">
			<picture r_name="'maskPicture'" r_template="'mainPictureTemplate'" r_graphic="'vwInvisibleLayer'" r_graphicName="'maskPicture'" r_height="outerHeight" r_width="outerWidth"/>
			<canvas r_name="'draggedZone'" r_template="'mainCanvasTemplate'" r_graphicName="'draggedZone'" r_graphic="'rngsdk.display.CdplSpriteSimple'" r_mask="'maskPicture'" r_maskDraggable="1" w_isDragged="0" r_mouseEnabled="1" rw_xPos="0" rw_yPos="0" nextChildTarget="''">
				<picture r_name="'background'" r_template="'mainPictureTemplate'" r_graphic="'vwInvisibleLayer'" r_height="innerHeight-1" r_width="innerWidth-1"/>
				<modifier r_name="'leftTouched'" r_template="'mainModifierTemplate'" r_modifierTarget="'leftTouched'" r_modifiedValue="graphic.graphicLeftTouchMask()"/>
				<modifier r_name="'upTouched'" r_template="'mainModifierTemplate'" r_modifierTarget="'upTouched'" r_modifiedValue="graphic.graphicUpTouchMask()"/>
				<modifier r_name="'rightTouched'" r_template="'mainModifierTemplate'" r_modifierTarget="'rightTouched'" r_modifiedValue="graphic.graphicRightTouchMask()"/>
				<modifier r_name="'downTouched'" r_template="'mainModifierTemplate'" r_modifierTarget="'downTouched'" r_modifiedValue="graphic.graphicDownTouchMask()"/>
			</canvas>
		</canvas>
		<canvas r_name="'horizontalAutoMaskedZone'" r_template="'maskedZone'" outerHeight="innerHeight" childModifier="0" snapping="1" refreshArrows="0" childMove="1" horizontalShift="0">
			<canvas r_name="'draggedZone'">
				<event r_name="'childModifier'" r_template="'mainEventTemplate'" r_eventTarget="'childModifier'" r_targetType="'attribute'">
					<effect r_name="'childModifier'" r_template="'mainGraphicEffectTemplate'" r_enabled="childMove&&(childModifier!=0)" r_type="(childModifier>0)?'NextChildX':'PreviousChildX'" r_targetContainer="nextChildTarget"/>
					<effect r_name="'positionModifier'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="!childMove&&(childModifier!=0)" r_effect="(childModifier>0)?(rw_xPos-=20):(rw_xPos+=20)"/>
					<effect r_name="'clean'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="childModifier!=0" r_effect="childModifier=0"/>
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
				<event r_name="'isDragged'" r_template="'mainEventTemplate'" r_eventTarget="'w_isDragged'" r_targetType="'attribute'">
					<effect r_name="'snap'" r_template="'mainGraphicEffectTemplate'" r_enabled="snapping&&!w_isDragged" r_type="'NearestChildX'" r_targetContainer="nextChildTarget"/>
					<effect r_name="'refreshArrows'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="refreshArrows=0"/>
				</event>
			</canvas>
			<button r_name="'leftArrow'" r_template="'mainButtonTemplate'"
							r_graphic="'f_left.png'"
							r_visible="!leftTouched"
							rw_xPos="-horizontalShift"
							rw_yPos="(outerHeight-w_initialHeight*r_scaleY)/2"
							r_scaleX="globalParameters.UIScale"
							r_scaleY="globalParameters.UIScale">
				<effect r_name="'leftArrow'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="childModifier--"/>
				<effect r_name="'refreshArrows'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="refreshArrows=0"/>
				<event r_name="'refreshArrows'" r_template="'mainEventTemplate'" r_eventTarget="'refreshArrows'" r_targetType="'attribute'">
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</button>
			<button r_name="'rightArrow'" r_template="'mainButtonTemplate'"
							r_graphic="'f_right.png'"
							r_visible="!rightTouched"
							rw_xPos="outerWidth-w_initialWidth*r_scaleX+horizontalShift"
							rw_yPos="(outerHeight-w_initialHeight*r_scaleY)/2"
							r_scaleX="globalParameters.UIScale"
							r_scaleY="globalParameters.UIScale">
				<effect r_name="'rightArrow'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="childModifier++"/>
				<effect r_name="'refreshArrows'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="refreshArrows=0"/>
				<event r_name="'refreshArrows'" r_template="'mainEventTemplate'" r_eventTarget="'refreshArrows'" r_targetType="'attribute'">
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</button>
		</canvas>
		<canvas r_name="'verticalAutoMaskedZone'" r_template="'maskedZone'" outerWidth="innerWidth" childModifier="0" snapping="1" refreshArrows="0" childMove="1" verticalShift="0">
			<canvas r_name="'draggedZone'">
				<event r_name="'childModifier'" r_template="'mainEventTemplate'" r_eventTarget="'childModifier'" r_targetType="'attribute'">
					<effect r_name="'childModifier'" r_template="'mainGraphicEffectTemplate'" r_enabled="childMove&&(childModifier!=0)" r_type="(childModifier>0)?'NextChildY':'PreviousChildY'" r_targetContainer="nextChildTarget"/>
					<effect r_name="'positionModifier'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="!childMove&&(childModifier!=0)" r_effect="(childModifier>0)?(rw_yPos-=20):(rw_yPos+=20)"/>
					<effect r_name="'clean'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="childModifier!=0" r_effect="childModifier=0"/>
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
				<event r_name="'isDragged'" r_template="'mainEventTemplate'" r_eventTarget="'w_isDragged'" r_targetType="'attribute'">
					<effect r_name="'snap'" r_template="'mainGraphicEffectTemplate'" r_enabled="snapping&&!w_isDragged" r_type="'NearestChildY'" r_targetContainer="nextChildTarget"/>
					<effect r_name="'refreshArrows'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="refreshArrows=0"/>
				</event>
			</canvas>
			<button r_name="'upArrow'" r_template="'mainButtonTemplate'"
							r_graphic="'f_up.png'"
							r_visible="!upTouched"
							rw_xPos="(outerWidth-w_initialWidth*r_scaleX)/2"
							rw_yPos="-verticalShift"
							r_scaleX="globalParameters.UIScale"
							r_scaleY="globalParameters.UIScale">
				<effect r_name="'upArrow'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="childModifier--"/>
				<effect r_name="'refreshArrows'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="refreshArrows=0"/>
				<event r_name="'refreshArrows'" r_template="'mainEventTemplate'" r_eventTarget="'refreshArrows'" r_targetType="'attribute'">
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</button>
			<button r_name="'downArrow'" r_template="'mainButtonTemplate'"
							r_graphic="'f_down.png'"
							r_visible="!downTouched"
							rw_xPos="(outerWidth-w_initialWidth*r_scaleX)/2"
							rw_yPos="outerHeight-w_initialHeight*r_scaleY+verticalShift"
							r_scaleX="globalParameters.UIScale"
							r_scaleY="globalParameters.UIScale">
				<effect r_name="'downArrow'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="childModifier++"/>
				<effect r_name="'refreshArrows'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="refreshArrows=0"/>
				<event r_name="'refreshArrows'" r_template="'mainEventTemplate'" r_eventTarget="'refreshArrows'" r_targetType="'attribute'">
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</button>
		</canvas>

		<!-- activate mask if minimum > maximum, activate sizer if maximum > minimum > ideal , nothing if ideal > minimum -->
		<canvas r_name="'verticalSizedMaskedZone'" r_template="'verticalAutoMaskedZone'"
						minimumSize="0"
						idealSize="0"
						maximumSize="0"
						verticalShift="10"
						innerHeight="(minimumSize>maximumSize)?idealSize:maximumSize"
						outerHeight="(minimumSize>maximumSize)?(maximumSize-2*verticalShift):maximumSize">
			<canvas r_name="'draggedZone'" nextChildTarget="'sizer'">
				<canvas r_name="'sizer'" r_template="'mainCanvasTemplate'"
								r_graphicName="'sizer'"
								r_graphic="'rngsdk.display.CdplSpriteSimple'"
								r_verticalSizer="(minimumSize>maximumSize)?idealSize:(min(idealSize,outerHeight))"/>
			</canvas>
			<modifier r_name="'yPos'" r_template="'mainModifierTemplate'" r_modifierTarget="'rw_yPos'" r_modifiedValue="$0+((minimumSize>maximumSize)?verticalShift:0)"/>
		</canvas>
		<canvas r_name="'horizontalSizedMaskedZone'" r_template="'horizontalAutoMaskedZone'"
						minimumSize="0"
						idealSize="0"
						maximumSize="0"
						horizontalShift="10"
						innerWidth="(minimumSize>maximumSize)?idealSize:maximumSize"
						outerWidth="(minimumSize>maximumSize)?(maximumSize-2*horizontalShift):maximumSize">
			<canvas r_name="'draggedZone'" nextChildTarget="'sizer'">
				<canvas r_name="'sizer'" r_template="'mainCanvasTemplate'"
								r_graphicName="'sizer'"
								r_graphic="'rngsdk.display.CdplSpriteSimple'"
								r_horizontalSizer="(minimumSize>maximumSize)?idealSize:(min(idealSize,outerWidth))"/>
			</canvas>
			<modifier r_name="'xPos'" r_template="'mainModifierTemplate'" r_modifierTarget="'rw_xPos'" r_modifiedValue="$0+((minimumSize>maximumSize)?horizontalShift:0)"/>
		</canvas>
		
		<!-- HELP SHORTCUT -->
		<canvasTemplate r_name="'shortcutHelpTemplate'" r_template="'mainCanvasTemplate'"
										shortcut="''"
										size="50"
										r_mouseEnabled="1"
										multiline="0">
			<canvas r_name="'shortcutHelp'" r_template="'mainCanvasTemplate'"
							r_visible="gameParameters.shortcutHelp&&!globalParameters.w_touchInput">
				<picture r_name="'background'" r_template="'mainPictureTemplate'" r_graphic="'vwShadowLayer'+size"/>
				<text r_name="'text'" r_template="'mainTextFieldTemplate'" r_text="shortcut" textSize="size/2" r_align="'center'" rw_xPos="-4" rw_yPos="(size-r_height)/2" r_width="size+8" r_height="textSize*(multiline?2.2:1)"/>
			</canvas>
		</canvasTemplate>
		
		<!-- SCROLL -->
		<canvasTemplate r_name="'scrollTemplate'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'" scrollWidth="600" scrollHeight="400">
			<canvasTemplate r_name="'maskedPicture'" r_template="'mainCanvasTemplate'" childXPos="0" childYPos="0" childWidth="100" childHeight="100">
				<picture r_name="'mask'" r_template="'mainPictureTemplate'" r_existingGraphic="'pictureMask'" rw_xPos="childXPos" rw_yPos="childYPos" r_width="childWidth" r_height="childHeight"/>
				<picture r_name="'picture'" r_template="'mainPictureTemplate'" r_existingGraphic="'pictureGraph'" rw_xPos="childXPos" rw_yPos="childYPos" r_mask="'pictureMask'"/>
			</canvasTemplate>

			<picture r_name="'scroll_top_left'" r_template="'mainPictureTemplate'" r_graphic="'parcheminTopLeft.png'"				 rw_xPos="0"											rw_yPos="0"/>
			<canvas r_name="'scroll_top_canvas'" r_template="'maskedPicture'" r_graphic="'scrollTop'"												 childXPos="99"								childYPos="0"								 childWidth="max(0, scrollWidth-198)" childHeight="175"/>
			<picture r_name="'scroll_top_right'" r_template="'mainPictureTemplate'" r_graphic="'parcheminTopRight.png'"			 rw_xPos="scrollWidth-100"				rw_yPos="0"/>
			<canvas r_name="'scroll_left_canvas'" r_template="'maskedPicture'" r_graphic="'scrollLeft'"											 childXPos="0"								 childYPos="174"							 childWidth="100" childHeight="max(0, scrollHeight-348)"/>
			<picture r_name="'scroll_center'" r_template="'mainPictureTemplate'" r_graphic="'parcheminCenter.png'"						rw_xPos="99"										 rw_yPos="174"										r_width="max(0, scrollWidth-198)" r_height="max(0, scrollHeight-348)"/>
			<canvas r_name="'scroll_right_canvas'" r_template="'maskedPicture'" r_graphic="'scrollRight'"										 childXPos="scrollWidth-100"	 childYPos="174"							 childWidth="100" childHeight="max(0, scrollHeight-348)"/>
			<picture r_name="'scroll_bottom_left'" r_template="'mainPictureTemplate'" r_graphic="'parcheminBottomLeft.png'"	 rw_xPos="0"											rw_yPos="scrollHeight-175"/>
			<canvas r_name="'scroll_bottom_canvas'" r_template="'maskedPicture'" r_graphic="'scrollBottom'"									 childXPos="99"								childYPos="scrollHeight-175"	childWidth="max(0, scrollWidth-198)" childHeight="175"/>
			<picture r_name="'scroll_bottom_right'" r_template="'mainPictureTemplate'" r_graphic="'parcheminBottomRight.png'" rw_xPos="scrollWidth-100"				rw_yPos="scrollHeight-175"/>
		</canvasTemplate>
		<canvasTemplate r_name="'scrollBackgroundTemplate'" r_template="'scrollTemplate'" scrollText="''">
			<canvas r_name="'textZone'" r_template="'verticalAutoMaskedZone'"
							rw_xPos="40"
							rw_yPos="50"
							outerWidth="scrollWidth-80"
							outerHeight="scrollHeight-100"
							innerWidth="scrollWidth-80"
							innerHeight="'ToBeReplaced'"
							snapping="0"
							childMove="0">
				<canvas r_name="'draggedZone'">
					<text r_name="'scrollText'" r_template="'mainTextFieldTemplate'"
								r_text="scrollText"
								r_width="scrollWidth-80"
								r_height="w_textHeight+4"
								textSize="10*globalParameters.UIScale">
						<modifier r_name="'innerHeight'" r_template="'mainModifierTemplate'" r_modifierTarget="'innerHeight'" r_modifiedValue="r_height"/>
					</text>
				</canvas>
				<button r_name="'downArrow'" rw_yPos="outerHeight"/>
				<button r_name="'upArrow'" rw_yPos="-w_initialHeight*globalParameters.UIScale"/>
			</canvas>
		</canvasTemplate>
	</canvases>
</data>