<?xml version="1.0" encoding="UTF-8" standalone="no"?><config>

	<!-- ///// SETTING DEFAULT VALUES \\\\\ -->
	<!-- Default Width/Height -->
	<if expression='#width == null || #width == ""'>
		<eval phase="begin" expression="#width = 500"/>
	</if>
	<if expression='#width < 250'>
		<eval phase="begin" expression="#width = 250"/>
	</if>
	
	<if expression='#showBackground == null || #showBackground == ""'>
		<eval phase="begin" expression="#showBackground = 'true'"/>
	</if>
	
	<if expression='#hideProgressInfoText == null || #hideProgressInfoText == ""'>
		<eval phase="begin" expression="#hideProgressInfoText = 'false'"/>
	</if>
	
	<if expression='#removeCurrencyOnCompleted == null || #removeCurrencyOnCompleted == ""'>
		<eval phase="begin" expression="#removeCurrencyOnCompleted = 'false'"/>
	</if>

	<!-- Default Y value for the progress bar -->
	<if expression='#maxValue == null || #maxValue == ""'>
		<eval phase="begin" expression="#maxValue = 100"/>
	</if>
  
	<!-- If value is not set, or is set to currency, sets value to be the User's count of the currency -->
	<if expression='#currency == null || #currency == ""'>
		<eval phase="begin" expression="#currency = 'CASH'"/>
	</if>
	
	
	<if expression='#completedText == null || #completedText == ""'>
		<eval phase="begin" expression="#completedText = 'Common_Completed'"/>
	</if>
	
	<eval phase="begin" expression="#value = #user.user.getCurrency(#hash(#currency))"/>
	<eval phase="begin" expression="#iconSize = 25"/>
	<eval phase="begin" expression="#height = 76"/>
	<eval phase="begin" expression="#progressBarWidth = #width - ~Constants.PADDING_LARGE * 2"/>
	<eval phase="begin" expression="#constHeight = 80"/>
	<eval phase="begin" expression="#constWidth = 500"/>
	<eval phase="begin" expression="#row1 = 19"/>
	<eval phase="begin" expression="#row2 = 50"/>


	<!-- ///// CREATING ELEMENTS \\\\\ -->
	<element bind-id="background" bind-type="zinc.ui.element.SlicedImage" image="common_BINDING_PROGRESSBAR_BG" sliceAll="2" width="${#width}" height="${#height}" visible="true"/>
	
	<if expression='#showBackground == "false"'>
		<eval phase="after" expression="#background.visible = false"/>
	</if>
	
	<!-- All Elements Container -->
	<element bind-id="progressAllInfo" bind-type="zinc.ui.element.Element" width="${#progressBarWidth}" top="${#background.top + ~Constants.PADDING_SMALL}">
		<!-- Progress Currency Text and Icon -->
		<element bind-id="questDesc" bind-type="zinc.ui.element.Label" text="${#lang(#descText)}" fontSize="14" color="0x600B02" x="${#progressX.left}" textAlignV="${~Alignment.CENTER}" y="3" />
		<element bind-type="zinc.ui.element.Label" bind-id="progressY" text="${#format(#value) + '/ ' + #format(#maxValue)}" width="${~Constants.PADDING_TINY}" x="${#progressAllInfo.right - progressY.width}" y="3" height="${~Constants.FONT_SIZE_BODY_TEXT}" fontSize="14" color="0x600B02" textAlignV="${~Alignment.CENTER}" textAlignH="${~Alignment.RIGHT}"/>
		<!-- Create a progress bar -->
		<element bind-id="progressBar" bind-type="madden.ui.element.ProgressBar" y="28" width="${#progressBarWidth}" height="4" showLabel="true" percent="${#value / #maxValue}" color="0x600B02"/>
		<eval phase="after" expression="#progressBar.showLabel = false"/>
		
		
		<if expression='#removeCurrencyOnCompleted == "true" && #value >= #maxValue'>
			<eval phase="after" expression="#progressY.visible = false"/>
			

			<element bind-id="completedTextShow" bind-type="zinc.ui.element.Label" text="${#lang(#completedText)}" fontSize="${~Constants.FONT_SIZE_BODY_TEXT}" x="${#progressAllInfo.left}" centerY="${#row1}"  height="${~Constants.FONT_SIZE_BODY_TEXT}" fontFace="${T(madden.ui.style.Font).FONT_BOLD}" textAlignV="${~Alignment.CENTER}" textAlignH="${~Alignment.CENTER}"/>
			
		</if>				
		<if expression='#hidedesc == "true"'>
			<eval phase="after" expression="#questDesc.visible = false"/>
		
		</if>	
	</element>
	
	
	<eval phase="after" expression="#progressAllInfo.centerX = #background.centerX"/>
</config>