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

	<!-- List all of the required resources for the splash screen -->
	<resources>
		<resource name="bgloginflow_SPLASH_SCREEN_1024_VN" />
		<resource name="bgloginflow_SPLASH_SCREEN_1024_FR_VN" />
		<resource name="bgloginflow_BACKGROUND_1024" />
		<resource name="skills_BAR" />
		<resource name="common_TILE_WHITE" />
		<resource name="common_LIST_BUTTON_BG_NEUTRAL_BLUE" />
		<!-- <resource name="bgloginflow_ALL_1024" /> -->
		<!-- <resource name="bgloginflow_NEXONLOGOTYPE" /> -->
		<resource name="partner_VIETNAME_AGE_RATING" />
		<resource name="headerbar_AGERATING_TEXT_NEW" />
		<resource name="partner_GARENA_LOGO" />
		<resource name="bgloginflow_SHADOW" />
		<!-- notice board resource-->
		<resource name="icon_SERVERMAINTENANCE" />
		<resource name="common_FRAME_BACKGROUND" />
		<resource name="common_FRAME_TEALGRADIENT" />
		<resource name="common_FRAME_GRAYGRADIENT" />
		<resource name="headerbar_BGTOP" />
		<resource name="headerbar_BGTOP_SHADOW" />
		<resource name="headerbar_BACKGROUND" />
		<resource name="common_HEADER_TRIM" />
		<resource name="common_HEADER_TRIMHIGHLIGHT" />
		<resource name="icon_ICONCLOSE" />
		<resource name="loading_LOADING_ANIMATION" />
		<resource name="darkbutton_BTN_BG_SMALL" />
		<resource name="darkbutton_BTN_BG_SMALL_PRESSED" />
	</resources>

	<textresources>
		<resource name="animxml_LOADINGSPRITE"/>
	</textresources>

	<binaryresources>
	</binaryresources>

	<background-splash name="bgloginflow_SPLASH_SCREEN_2048_VN" />
	<background-splash-low name="bgloginflow_SPLASH_SCREEN_1024_VN" />
	<background-splash-fr name="bgloginflow_SPLASH_SCREEN_2048_FR_VN" />
	<background-splash-low-fr name="bgloginflow_SPLASH_SCREEN_1024_FR_VN" />
	<background-empty name="bgloginflow_BACKGROUND_2048" />
	<background-empty-low name="bgloginflow_BACKGROUND_1024" />
	<olp name="login_OLP" />
	<olp_fr name="login_OLP_FR" />
	<hh name="login_HH" />

	<!-- Loading tips -->
	<tips>
		<tip percent="0" text="Splash_0_Percent" />
		<tip percent="15" text="Splash_15_Percent" />
		<tip percent="30" text="Splash_30_Percent" />
		<tip percent="40" text="Splash_40_Percent" />
		<tip percent="60" text="Splash_60_Percent" />
		<tip percent="65" text="Splash_65_Percent" />
		<tip percent="70" text="Splash_70_Percent" />
		<tip percent="75" text="Splash_75_Percent" />
		<tip percent="80" text="Splash_80_Percent" />
		<tip percent="85" text="Splash_85_Percent" />
	</tips>

	<!-- Dynamic view binding, note coordinates are relative to actual background image and not screen space -->
	<!-- #parent #step #is_wide_screen are required.Should be set in haxe code before bindingContext.begin() called-->
	<view>
		<eval phase="begin" expression="#False_Value = false" />
		<eval phase="begin" expression="#True_Value = true" />
		<eval phase="begin" expression="#langService = T(zinc.service.Locator).fetch(null,T(zinc.service.localization.ILocalizationService))" />
		<!-- We can NOT use Constants.IS_WIDE_SCREEN here, as Constants.IS_WIDE_SCREEN was changed in game, but the value cached in script context won't reflect the change-->
		<eval phase="begin" expression="#wide_screen_clip_width = 160" />
		<eval phase="begin" expression="#license_font_size = 12" />
		<eval phase="begin" expression="#label_left_offset = #parent.width * 0.07 + 6" />
		<if expression="#is_wide_screen == #True_Value">
			<eval phase="begin" expression="#wide_screen_clip_width = 200" />
			<eval phase="begin" expression="#license_font_size = 12" />
		</if>
		<!-- Shadow under the Nexon logo-->
		<!--
		<element bind-type="zinc.ui.element.ScaledImage" begin-image="bgloginflow_SHADOW"
		begin-width="${#parent.width}" begin-height="120"
		begin-imageWidth="${#parent.width}" begin-imageHeight="120" 
		begin-scaleMode="${~ScaleMode.FILL_NOMASK}" />
		-->
	<element bind-type="zinc.ui.element.SlicedImage" begin-image="bgloginflow_SHADOW"
		begin-width="${#parent.width}" begin-height="120"
		begin-sliceAll="30"
		begin-scaleMode="${~ScaleMode.FILL_NOMASK}" />
	<element bind-type="zinc.ui.element.ScaledImage" bind-field="_splash"
		begin-image=""
		begin-width="${#parent.width}" begin-height="${#parent.height}"
		begin-imageWidth="${~Constants.BACKGROUND_LOW_WIDTH}" begin-imageHeight="${~Constants.BACKGROUND_LOW_HEIGHT}"
		begin-scaleMode="${~ScaleMode.FILL_NOMASK}"
		centerX="${#parent.centerX}" centerY="${#parent.centerY}"/>
	<element bind-type="zinc.ui.element.Label" bind-field="_downloadNotice" bind-id="_downloadNotice"
		textAlignH="${~Alignment.BEGIN}" resizeType="${~ResizeType.COMPRESS}"
		fontFace="CruyffSansNormal, Regular" fontSize="12"
		width="${#parent.width * 0.316}" multiline="true"
		text="${#langService.getText('data_download_notice')}"
		color="${~Constants.COLOR_BLACK}" alpha="1.0"
		left="${#label_left_offset}" top="${#parent.centerY + 89}" />
	<element bind-type="zinc.ui.element.Label" bind-field="_license" bind-id="_license"
		textAlignH="${~Alignment.BEGIN}"
		fontFace="CruyffSansNormal, Regular" fontSize="${#license_font_size}"
		width="${#parent.width * 0.316}" multiline="true"
		text="${#langService.getText('legal_splash_text')}"
		color="${~Constants.COLOR_BLACK}" alpha="1.0"
		left="${#label_left_offset}" top="${#_downloadNotice.bottom + 1}" />
	<!--<element bind-id="_license" bind-type="zinc.ui.element.Label"
		begin-textAlignH="${~Alignment.BEGIN}"
		begin-text="${#langService.getText('legal_splash_text')}"
		begin-multiline="true" begin-alpha="1.0" begin-width="${#parent.width * 0.316}"
		data-fontFace="Posterama, Light" data-fontSize="${#license_font_size}"
		color="${~Constants.COLOR_WHITE}" x="${#label_left_offset}" y="${_downloadNotice.bottom + 8}" />-->
	<element bind-type="zinc.ui.element.Label" bind-field="_versionText"
		textAlignH="${~Alignment.BEGIN}"
		text="${'app:' + #ver_app + ' res:' + #ver_res + ' server:' + #ver_server + ' gp:' + #ver_gp }"
		multiline="false" fontFace="CruyffSansNormal, Regular" fontSize="12"
		color="${~Constants.COLOR_BLACK}" alpha="1.0"
		x="${#label_left_offset}" y="${#_license.bottom + 1}" />
	<element bind-type="zinc.ui.element.Image"  bind-field="_ageRatingImage" begin-image="headerbar_AGERATING_TEXT_NEW" begin-width="120" begin-height="40" bottom="${#parent.height - 16}" right="${#parent.width - #safe_area_margin - 16}" />
	<!-- Using default size that same as image, Nexon Logo-->
	<!-- <element bind-type="zinc.ui.element.Image" begin-image="bgloginflow_NEXONLOGOTYPE" top="40" left="${#safe_area_margin + 40}" /> -->
	<!-- <element bind-type="zinc.ui.element.Image" begin-image="bgloginflow_ALL_1024" bottom="${#parent.height - 40}" right="${#parent.width - 40 - #safe_area_margin}" /> -->
	<!-- to make shadow, copy & paste, remove this when shadow font is ready-->
	<!--
	<element bind-id="_license_shadow" bind-type="zinc.ui.element.Label" 
		begin-textAlignH="${~Alignment.BEGIN}" 
		begin-text="${#langService.getText('legal_splash_text')}" 
		begin-multiline="true" begin-alpha="0.8" begin-width="${#parent.width * 0.316}" 
		data-fontFace="Posterama, Light" data-fontSize="${#license_font_size}" 
		color="${~Constants.COLOR_WHITE}" x="${#label_left_offset}" bottom="${#parent.height - 66}" />
		-->
	<!-- 0 means SplashScreenK -->
	<if expression="#step == 0">
		<element bind-type="madden.ui.element.splash.SplashLoadingBar" bind-id="_loadingBar" bind-field="_loadingBar"
			data-height="6" data-barHeight="6" 
			x="${#label_left_offset}" y="${#parent.centerY + 49}" width="${#parent.width * 0.316}"
			barColor="0x9A7733" barBackgroundColor="0x1F1A19" divider="4"
			fontColor="0xFFFFFF"
			fontFace="CruyffSansNormal, Regular" fontSize="14" />
	</if>
	<!-- 1 means LoginViewK -->
	<if expression="#step == 1">
		<element bind-type="madden.ui.element.button.SoundButton" bind-id="_screenButton" bind-field="_screenButton"
			begin-width="${#parent.width}" begin-height="${#parent.height}" activatedSound="${~Constants.SFX_BUTTON_SELECT}"
			centerX="${#parent.centerX}" centerY="${#parent.centerY}"/>
		<element bind-type="zinc.ui.element.SlicedImage" bind-id="_actionBanner" bind-field="_actionBanner"
			begin-image="common_TAPPLAYBUTTON"
			begin-x="${#label_left_offset+1}" begin-y="${#parent.centerY + 20}"
			sliceLeft = "20" sliceRight = "20" overflowLeft = "4" overflowRight = "4"
			begin-width="${#parent.width * 0.316}" begin-height="52" />
		<element bind-type="zinc.ui.element.Label" bind-id="_tapToPlay"
			begin-width="${#_actionBanner.width * 0.7}" begin-height="${#_actionBanner.height - ~Constants.PADDING_SMALL}"
			fontSize="${~Constants.FONT_SIZE_BUTTON_NEUTRAL}" fontFace="CruyffSansNormal, Medium" 
			text="${#langService.getText('TAP_TO_PLAY')}"
			textAlignH="${~Alignment.CENTER}" textAlignV="${~Alignment.CENTER}"
			centerX="${#_actionBanner.centerX}" centerY="${#_actionBanner.centerY}"
			color="${~Constants.COLOR_BLACK}" />
		<element bind-type="zinc.ui.element.Label" bind-field="_regionText"
			textAlignH="${~Alignment.BEGIN}" 
			text="${#langService.getText('LoadingScreen_Region') + #langService.getText('RegionName_'+#region)}"
			multiline="false" fontFace="CruyffSansNormal, Regular" fontSize="16" 
			color="${~Constants.SECONDARY_COLOR}" alpha="1.0" 
			x="${#label_left_offset}" y="16" />

	</if>

	<if expression="#step == 1">
		<eval phase="after" expression="#_license.top = #_downloadNotice.bottom + 1" />
	</if>
</view>


</config>
