<xml>
	<ui>
		<OnEvent id="LevelPlayOn" />
		<OnEvent id="LevelLost" />
		<OnEvent id="LevelWon" />
		<OnEvent id="SceneOpen" />
		<OnEvent id="Welcome" />
		<OnEvent id="Intro" />
		<OnEvent id="TutorialStarted" />
		<OnEvent id="ShowShop" />
		<OnEvent id="UpgradeSelect" />
		<OnEvent id="UpgradeWelcome" />
		<OnEvent id="ShakeStart" />
		<OnEvent id="ShakeFinish" />
		<OnEvent id="EasierLevel"/>
		<OnEvent id="LevelUnlocked"/>
		<OnEvent id="StartDialogue"/>
		<OnEvent id="ExitConfirm"/>
		<OnEvent id="RestartConfirm"/>
		
		<OnEvent id="StartButtonPressed">
			if core.Lib.scene.endless_shift:
				core.Lib.scene.LevelStarted()
			elif core.Lib.scene.ui >> 'WaiterStats':
				core.Lib.scene.ui.ShowShop()
			elif core.Lib.scene.can_upgrade:
				if core.Lib.scene.first_upgrade:
					core.Lib.scene.ui.Attach(core.mod.Timer, time = 0.1, callback = lambda x: x.UpgradeWelcome())
				else:
					core.Lib.scene.ui.Attach(core.mod.Timer, time = 0.1, callback = lambda x: x.UpgradeSelect())
			else:
				#for table in core.Lib.scene.tables:
				#	table.Attach(core.mod.Timer, time = 0.8, callback = lambda x: x.AddToBackground())
				if False:#core.Lib.scene.tutorial:
					core.Lib.scene.Attach(core.mod.Timer, time = 0.5, 
						callback = lambda x: x.ui.TutorialStarted())
				elif core.Lib.scene.cas_easelevel:
					core.Lib.scene.Attach(core.mod.Timer, time = 0.5, 
						callback = lambda x: x.ui.EasierLevel())
				else:
					core.Lib.scene.TryStartLevel()
		</OnEvent>

		<OnEvent id="Goal0Complete">
			(self >> 'BlinkingMessage' >> 'Window' >> 'MessageText').text = "*GOALCOMPLETED"
			(self >> 'BlinkingMessage').time = 0
			(self >> 'BlinkingMessage').FadeIn()
			(self >> 'GoalDisplay'    ).text = "*GOAL1DISPLAY"
		</OnEvent>
		
		<OnEvent id="Goal1Complete">
			(self >> 'GoalDisplay'    ).text = "*GOAL2DISPLAY"
		</OnEvent>
		
		<OnEvent id="Goal2Complete">
			(self >> 'GoalDisplay'    ).text = "*GOAL2DISPLAY"
		</OnEvent>
		
		<OnEvent id="ScoreChanged">
			if core.Lib.vars.goal_2 > 0:
				progress = max(1, min(180, (180 * self.score) / core.Lib.vars.goal_2))
			else:
				progress = 1
			(self >> 'StencilMask').width = 181 - int(progress)
		</OnEvent>
		
		<OnEvent id="LevelStarted">
			(self >> 'HudTimer').Attach(core.mod.Tween, time = 0.5, easer = 'sine', flags = 'out')\
				.AddPosition((235, 640))\
				.AddScale((1, 1))\
				.AddTransparency(1)
		</OnEvent>
		
		<OnEvent id="LevelComplete">
			(self >> 'HudTimer').Attach(core.mod.Tween, time = 0.5, easer = 'sine', flags = 'in')\
				.AddPosition((235, 768))\
				.AddScale((1.5, 1.5))\
				.AddTransparency(0)
		</OnEvent>
		
		<OnEvent id="InitializedGoals">
			star1 = 180 * core.Lib.vars.goal_0 / core.Lib.vars.goal_2
			star2 = 180 * core.Lib.vars.goal_1 / core.Lib.vars.goal_2
			(self >> 'StencilMask_Star1').width = 181 - int(star1)
			(self >> 'StencilMask_Star2').width = 181 - int(star2)
			if core.Lib.vars.goal_0 == core.Lib.vars.goal_1:
				(self >> 'Overlay_Star2').color = (self >> 'Overlay_Star1').color
		</OnEvent>


		<core.Widget
			id="Warnings" />
		
		<core.Widget
			id="TutorialTip"
			class="tooltip"
			text="Hey my man"
			visible="False"
			nohover="True"/>
		
		<core.Widget
			id="ConditionNotification"
			class="darkness"
			fader="fade"
			visible="False"
			soundin="window_appear"
			soundout="close_click">
			<core.Widget
				id="Window"
				fader="overscale"
				class="condition_message">
				<core.Widget
					id="Title"
					class="title"
					fader="overscale"
					text="Earthquake warning!"
					textshuffle="0.03">
					<OnTime sec="0.25">
						self.time = 0
						self.textshuffle = -self.textshuffle
						self.UpdateStyle()
					</OnTime>
				</core.Widget>
					
					
				<core.Widget
					id="Description"
					fader="overscale"
					class="description">
					<core.Widget
						id="Content"
						class="content" 
						text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi iaculis, tellus et pulvinar gravida." />
				</core.Widget>
			</core.Widget>
		</core.Widget>
		
		<!--core.Widget 
			id="WaiterStats" 
			class="waiter_stat_container"
			visible2="False"
			fader="scale"
			position="100,100">
			<core.Widget
				id="StateHolder"
				class="holder"
				position="40,0">
				<core.Widget
					id="State_%"
					width="128"
					height="30"
					repeatme="4"
					class="board">
					<core.Widget 
						id="Progress" 
						class="stat" 
						image="ui/widgets/panel_4_small"
						color="darkgray"
						uv="0,0,1,0.25"/>
					<core.Widget
						id="Label"
						class="label" text="Label" />
				</core.Widget>
			</core.Widget>
			<OnEvent id="Created">
				#owner = core.Lib.scene >> self.owner
				stats = [ 40, 70, 20, 50 ]
				labels = [ 'Patience', 'Attention', 'Volubility', 'Generosity' ]
				states = self >> 'StateHolder'
				options = self >> 'EventHolder'
				for i in range(4):
					state = states >> 'State_{0}'.format(i)
					state.position = 0, i * 32
					(state >> 'Progress').uv = stats[i] / 100.0, i * 0.25, 1, (i + 1) * 0.25
					(state >> 'Progress').position = stats[i] * 128 / 100, 0
					(state >> 'Label').text = labels[i]
				self.visible = True
			</OnEvent>
		</core.Widget-->
		
		
		<core.Widget
			id="GameplayTipHolder">
			
			<!--core.Widget
				id="GameplayTip_Header"
				class="happy_message"
				text="*NEWCUSTOMER"
				visible="False" /-->
			
			<core.Widget
				id="GameplayTip"
				class="helptext2 text_center"
				visible="False" />
			
			<level.IntroFace id="GameplayTip_Face" face="boy_cid" transparency="0" width="128" />
		</core.Widget>
		
		<core.Widget
			id="GameplayTip_Overlay"
			class="fullscreen"
			visible="False" />
		
		<core.Widget 
			id="FlashlightView" 
			size="1024,768" 
			class="overlay"
			image="ui/widgets/overlay_flashlight"
			visible="false"
			nohover="true"
			transparency="0"
			uv="0.5,0.5,0.5,0.5">
		</core.Widget>
		
		<core.Widget text="*UPGRADE" class="button overlay" position="-420,0" show="LevelUnlocked">
			<OnEvent id="MouseUp">
				self.visible = False
				core.Lib.scene.ui.UpgradeSelect()
			</OnEvent>
		</core.Widget>
		
		<core.Widget 
			id="HudTimer"
			image="ui/widgets/hud" 
			position="235,768" 
			scale="1.5,1.5" 
			transparency="0"
			class="hud">
			<core.Widget position="160,0">
				<core.Widget class="display_stars" id="StarsContainer" columns="5">
					<core.Widget class="display_star" id="Star_%" image="ui/widgets/star" repeatme="5">
						<OnEvent id="Created">
							self.position -= 0, self.number
							self.visible = False
						</OnEvent>
					</core.Widget>
				</core.Widget>
				
				<core.Widget position="262,120" rotation="-189" size="10,10" class="inner_overlay">
					<core.Widget id="StencilMask" class="display_stencil" size="180,100" />
				</core.Widget>
				
				<core.Widget class="display_fill" position="64,64" id="ScoreBar" />
				
				<core.Widget position="262,120" rotation="-189" size="10,10" class="inner_overlay">
					<core.Widget id="StencilMask_Star1" class="display_stencil_star1" size="180,100" />
				</core.Widget>
				
				<core.Widget position="262,120" rotation="-189" size="10,10" class="inner_overlay">
					<core.Widget id="StencilMask_Star2" class="display_stencil_star2" size="180,100" />
				</core.Widget>
				
				<core.Widget class="display_fill_star0" position="64,64" color="#B0008000" />
				<core.Widget id="Overlay_Star1" class="display_fill_star1" position="64,64" color="#B0800000" />
				<core.Widget id="Overlay_Star2" class="display_fill_star2" position="64,64" color="#B0006080" />
				
				<core.Widget class="display_score" text="{score}" position="110,48" rotation="-4.5" id="ScoreDisplay" />
				<core.Widget class="display_score light_text" text="{score}" position="110,48" rotation="-4.5" id="ScoreDisplay_light" transparency="0" />
				<core.Widget class="display_goal" text="*GOAL0DISPLAY" position="115,94" rotation="-5.2" id="GoalDisplay" />
			</core.Widget>
			
			<core.Widget position="201,59" image="ui/widgets/hud_clock" uv="0,0,0.125,0.125">
				<OnTime sec="0.25">
					if core.Lib.scene.progress:
						frame = int(min(63, core.Lib.scene.progress.value * 63))
						if not hasattr(self, 'frame') or frame > self.frame:
							self.frame = frame
					else:
						self.frame = 63
					x, y = self.frame % 8, self.frame / 8
					self.uv = (x * 0.125, y * 0.125, (x + 1) * 0.125, (y + 1) * 0.125)
					self.time = 0
				</OnTime>
			</core.Widget>
			
			<core.Widget id="Powerups" position="650,50" />
			<core.Widget id="Powerups_Layer" class="position_absolute" />
			
			<core.Widget position="135,40" size="290,88">
				<OnEvent id="MouseUp">
					(core.Lib.scene.ui >> 'Options').FadeIn()
				</OnEvent>
			</core.Widget>
		</core.Widget>
		
		<core.Widget 
			id="TutorialHelper" 
			size="1024,768" 
			class="overlay"
			image="ui/widgets/clickhere"
			visible="false"
			nohover="true"
			transparency="0"
			uv="0.5,0.5,0.5,0.5">
			<core.Widget id="HelpText" class="helptext" width="300"
				text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus gravida suscipit magna ut gravida." />
		</core.Widget>
		
		<core.Widget
			id="UpgradeWelcome"
			class="darkness"
			fader="darkness"
			fadein="UpgradeWelcome"
			voiceover="UPGRADETIME_TEXT">
			<core.Widget
				id="Window"
				class="window window_small">
				<core.Widget class="title" text="*UPGRADETIME" />
				<core.Widget id="Intro_1" class="intro">
					<core.Widget id="Content" class="contents" text="*UPGRADETIME_TEXT" />
				</core.Widget>
				<core.Widget id="ButtonBox" text="*OKAY" class="ok button buttonbox">
					<OnEvent id="MouseUp">
						self.window.FadeOut()
						core.Lib.scene.ui.UpgradeSelect()
					</OnEvent>
				</core.Widget>
			</core.Widget>
		</core.Widget>

		<core.Widget
			id="UpgradeTooltips"
			class="overlay"
			fader="darkness"
			fadein="UpgradeSelect">
			<core.Widget 
				id="Window" 
				width="1024" 
				position="0,620">
				<core.Widget 
					class="button ok"
					text="*CONTINUE"
					position="400,0">
					<OnEvent id="MouseUp">
						self.window.FadeOut()
						self.window._fader_tween.Finished += core.Lib.scene.OnUpgradeComplete
						if core.Lib.scene.cas_easelevel:
							self.window._fader_tween.Finished += core.Lib.scene.ui.EasierLevel
						else:
							self.window._fader_tween.Finished += core.Lib.scene.TryStartLevel
					</OnEvent>
				</core.Widget>
				<core.Widget 
					class="button cancel"
					text="*OPTIONS"
					position="400,-20">
					<OnEvent id="MouseUp">
						(core.Lib.scene.ui >> 'Options').FadeIn()
					</OnEvent>
				</core.Widget>
				<core.Widget
					position="100,0"
					class="upgrade_chest"
					image="ui/widgets/hud_shop">
					<core.Widget 
						text="{coins_total}" 
						class="coins"/>
				</core.Widget>
			</core.Widget>
		</core.Widget>
			
		<core.Widget 
			id="UpgradeDescription"
			class="darkness"
			fader="darkness"
			visible="False">
			<core.Widget 
				id="Window"
				class="window window_small">
				<core.Widget class="cross">
					<OnEvent id="MouseUp">
						self.window.FadeOut()
					</OnEvent>
				</core.Widget>
				<core.Widget id="WindowTitle" class="minor_title" text="*UPGRADEPURCHASE" position="0,-1" />
				<core.Widget id="Title" class="minor_subtitle" text="Blank title" />
				<core.Widget id="Description" class="intro">
					<core.Widget id="Content" class="contents" />
				</core.Widget>
				<core.Widget
					class="buttonbox"
					columns="2">
					<core.Widget id="BuyButton" text="*BUY" class="button paycoins">
						<core.Widget id="Value" class="coins" text="99" nohover="True" />
						<OnEvent id="MouseUp">
							core.Lib.vars.coins_total -= self.window.upgrade_price
							core.Lib.scene.AddUpgrade(self.window.upgrade_id)
							core.Lib.scene.OnUpgradePurchased(self.window.upgrade_id)
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
					
					<core.Widget
						class="button cancel"
						text="*CANCEL">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
		</core.Widget>
		
		<core.Widget
			id="IntroDialogue"
			fadein="StartDialogue"
			class="darkness"
			fader="darkness">
			<core.Widget
				id="Window"
				class="dialogue_holder"
				nohover="True">
				<level.IntroDialogue id="Dialogue" />
				<core.Widget id="Quote_1" class="intro inner_overlay" position="30,65">
					<core.Widget id="Content" class="contents block_1 quote_top" />
				</core.Widget>
				<core.Widget id="Quote_2" class="intro inner_overlay" position="50,140">
					<core.Widget id="Content" class="contents block_1 quote_bottom" />
				</core.Widget>
				<core.Widget class="powerup_icon" position="-110,-12">
					<level.IntroFace id="Face_1" />
				</core.Widget>
				<core.Widget class="powerup_icon" position="295,65">
					<level.IntroFace id="Face_2" flipped="True" />
				</core.Widget>
			</core.Widget>
			<OnEvent id="MouseUp">
				(self >> 'Dialogue').ForceNext()
			</OnEvent>
			<core.Widget text="*SKIP" class="button inner_overlay cancel" position="-420,680">
				<OnEvent id="MouseUp">
					self.window.FadeOut()
					self.window.nohover = True
					core.Lib.scene.TryStartLevel()
					self.window._fader_tween.Finished += self.window.Dispose
				</OnEvent>
			</core.Widget>
		</core.Widget>
		
		<!--core.Widget
			id="Welcome"
			fadein="Welcome"
			class="darkness"
			fader="darkness">
			<core.Widget
				id="Window"
				class="window">
				<core.Widget id="Title" class="title" text="*DAYTITLE" />
				<core.Widget visible="False">
					<core.Widget id="Intro_1" class="intro">
						<core.Widget id="Content" class="contents block_1" />
					</core.Widget>
					<core.Widget id="Intro_2" class="intro block_2" />
					<core.Widget id="Intro_3" class="intro block_3" />
				</core.Widget>
				
				<level.IntroDialogue id="Dialogue" />
				
				<core.Widget id="Quote_1" class="intro" position="40,0">
					<core.Widget id="Content" class="contents block_1 quote_top" />
				</core.Widget>
				<core.Widget id="Quote_2" class="intro" position="20,0">
					<core.Widget id="Content" class="contents block_1 quote_bottom" />
				</core.Widget>
				<core.Widget class="powerup_icon" position="-90,-12">
					<level.IntroFace id="Face_1" />
				</core.Widget>
				<core.Widget class="powerup_icon" position="275,65">
					<level.IntroFace id="Face_2" flipped="True" />
				</core.Widget>
				
				<core.Widget height="6" />
				
				<core.Widget id="Stats" class="stats_table" columns="2" transparency="0" width="200" position="30">
					<level.Stat id="Stat_1" label="*GOALSCORE" value="{goal_0}" class="important" />
					<level.Stat id="Stat_2" label="*EXPERTSCORE" value="{goal_1}" class="important" />
				</core.Widget>
				
				<core.Widget class="buttonbox" columns="2">
					<core.Widget text="*NEXT" class="button ok">
						<OnEvent id="MouseUp">
							(self.parent.parent >> 'Dialogue').ForceNext()
						</OnEvent>
					</core.Widget>
					<core.Widget text="*SKIP" class="button cancel">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
							self.window._fader_tween.Finished += core.Lib.scene.ui.StartButtonPressed
						</OnEvent>
					</core.Widget>
				</core.Widget>
				<core.Widget id="Character" image="ui/characters/boy_customer_geek" position="205,-345" visible="false" />
			</core.Widget>
		</core.Widget-->
		
		<core.Widget
			id="EasierLevelConfirmation"
			class="darkness"
			fader="darkness"
			fadein="EasierLevel"
			voiceover="EASIERLEVEL_TEXT"
			soundin="window_appear">
			<core.Widget
				id="Window"
				class="window window_small">
				<core.Widget class="cross">
					<OnEvent id="MouseUp">
						core.Lib.scene.TryStartLevel()
						self.window.FadeOut()
					</OnEvent>
				</core.Widget>
				<core.Widget class="title" text="*EASIERLEVEL" />
				<core.Widget id="Intro_1" class="intro">
					<core.Widget id="Content" class="contents" text="*EASIERLEVEL_TEXT" />
				</core.Widget>
				<core.Widget id="ButtonBox" class="buttonbox" columns="2">
					<core.Widget id="Button_Yes" text="*YES" class="button ok paycoins">
						<core.Widget id="Value" class="coins" text="{price_easierlevel}" nohover="True" />
						<OnEvent id="MouseUp">
							core.Lib.scene.levelspeed *= 0.8
							core.Lib.scene.TryStartLevel()
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
					<core.Widget id="Button_No" text="*NO" class="button cancel">
						<OnEvent id="MouseUp">
							core.Lib.scene.TryStartLevel()
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
			<OnEvent id="Created">
				if not core.gamecenter:
					self.Dispose()
			</OnEvent>
		</core.Widget>
		
		<core.Widget
			id="EasierLevelConfirmationFree"
			class="darkness"
			fader="darkness"
			fadein="EasierLevel"
			voiceover="EASIERLEVEL_TEXT"
			soundin="window_appear">
			<core.Widget
				id="Window"
				class="window window_small">
				<core.Widget class="cross">
					<OnEvent id="MouseUp">
						core.Lib.scene.TryStartLevel()
						self.window.FadeOut()
					</OnEvent>
				</core.Widget>
				<core.Widget class="title" text="*EASIERLEVEL" />
				<core.Widget id="Intro_1" class="intro">
					<core.Widget id="Content" class="contents" text="*EASIERLEVEL_TEXT" />
				</core.Widget>
				<core.Widget id="ButtonBox" class="buttonbox" columns="2">
					<core.Widget id="Button_Yes" text="*YES" class="button ok">
						<OnEvent id="MouseUp">
							core.Lib.scene.levelspeed *= 0.8
							core.Lib.scene.TryStartLevel()
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
					<core.Widget id="Button_No" text="*NO" class="button cancel">
						<OnEvent id="MouseUp">
							core.Lib.scene.TryStartLevel()
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
			<OnEvent id="Created">
				if core.gamecenter:
					self.Dispose()
			</OnEvent>
		</core.Widget>
		
		<core.Widget
			id="ShakeEffectOverlay"
			class="camera_shake"
			nohover="True"
			fadein="ShakeStart"
			fadeout="ShakeFinish">
			<OnEvent id="FadeIn" with_params="False">
				self.updaterate = 1.0
			</OnEvent>
			<OnEvent id="FadeOut" with_params="False">
				self.updaterate = 0.4
			</OnEvent>
		</core.Widget>
		
		<core.Widget
			id="LevelProceed"
			class="darkness"
			fadein="LevelWon" 
			fader="darkness"
			transparency="0" 
			soundin="people_applause2">
			<core.Widget
				id="Window"
				class="window window">
				<core.Widget id="Title" class="title bright" textshuffle="0.03" text="*STAGEWON">
					<OnTime sec="0.25">
						self.time = 0
						self.textshuffle = -self.textshuffle
						self.UpdateStyle()
					</OnTime>
				</core.Widget>
				<core.Widget id="Intro_1" class="intro" position="30,0">
					<core.Widget id="Content" class="contents block_1 quote_top" width="260" />
				</core.Widget>
				<core.Widget class="powerup_icon" position="-90,-12">
					<level.IntroFace id="Face_1" face="boy_cid" emotion="excited" />
				</core.Widget>
				<core.Widget height="10" />
				<core.Widget class="stats_table" columns="4">
					<level.Stat label="*ORDERS" value="{score_orders}" delay="0.5" class="unimportant" />
					<level.Stat label="*TIPS" value="{score_tips}" delay="1.0" class="unimportant" />
					<level.Stat label="*COLORMATCHES" value="{score_colormatches}" delay="1.5" class="unimportant" />
					<level.Stat label="*EXTRAS" value="{score_extras}" delay="2.0" class="unimportant" />
				</core.Widget>
				<core.Widget height="25" />
				<core.Widget class="stats_table" columns="2">
					<level.Stat label="...." value="{score}" delay="2.5" class="important">
						<core.Widget class="label star_container" position="25,0">
							<core.Widget class="star" position="1,1" color="black" />
							<core.Widget class="star" position="26,1" color="black" />
							<core.Widget class="star" position="51,1" color="black" />
							<core.Widget id="Star_0" class="star" position="0,0" />
							<core.Widget id="Star_1" class="star" position="25,0" />
							<core.Widget id="Star_2" class="star" position="50,0" />
						</core.Widget>
						<OnEvent id="Created">
							(self >> 'Label').transparency = 0
						</OnEvent>
					</level.Stat>
					<core.Widget columns="2" position="0,7">
						<level.Stat label="*BEST" value="{score}" delay="3.0" class="unimportant" />
						<level.Stat label="*REWARD" value="{coins}" delay="3.5" class="unimportant gold" />
					</core.Widget>
				</core.Widget>
				<level.Stat id="ContinueButton" delay="4.0" class="buttonbox" width="320">
					<core.Widget text="*CONTINUE" class="button ok" id="Button">
						<OnEvent id="MouseUp">
							core.Lib.scene.Proceed()
						</OnEvent>
					</core.Widget >
				</level.Stat>
			</core.Widget>
		</core.Widget>
		
		<core.Widget
			id="LevelPlayOn"
			class="darkness"
			fader="darkness"
			fadein="LevelPlayOn"
			soundin="window_appear">
			<core.Widget
				id="Window"
				class="window">
				<core.Widget class="title" text="*ABOUTTOLOSE" />
				<core.Widget id="Intro_1" class="intro" position="30,0">
					<core.Widget id="Content" class="contents block_1 quote_top" width="260" text="*ABOUTTOLOSE_TEXT"/>
				</core.Widget>
				<core.Widget height="75" />
				<core.Widget class="stats_table" columns="1">
					<level.Stat label="*TOTALSCORE" value="{score} / {goal_0}" class="important bad lowkey" />
				</core.Widget>
				<core.Widget class="buttonbox" columns="2">
					<core.Widget text="*PLAYON" class="button paycoins">
						<core.Widget id="Value" class="coins" text="{price_playon}" nohover="True" />
						<OnEvent id="MouseUp">
							core.Lib.scene.SpawnExtraCustomers()
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
					<core.Widget text="*GIVEUP" class="button cancel">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
							core.Lib.scene.ui.LevelComplete()
							core.Lib.scene.music.Stop()
							self._fader_tween.Finished += core.Lib.scene.ui.LevelLost
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
			<OnEvent id="FadeIn" with_params="False">
				if core.Lib.scene.endless_shift:
					(self >> 'GoalScore').visible = False
					(self >> 'Subtitle').visible = False
			</OnEvent>
		</core.Widget>
		
		<core.Widget
			id="LevelRestart"
			class="darkness"
			fadein="LevelLost" 
			fader="darkness"
			transparency="0"
			soundin="window_appear">
			<core.Widget
				id="Window"
				class="window">
				<core.Widget class="title" text="*STAGELOST" />
				<core.Widget id="Intro_1" class="intro" position="30,0">
					<core.Widget id="Content" class="contents block_1 quote_top" width="260" />
				</core.Widget>
				<core.Widget class="powerup_icon" position="-90,-12">
					<level.IntroFace id="Face_1" face="boy_cid" emotion="sad" />
				</core.Widget>
				<core.Widget height="10" />
				<core.Widget class="stats_table" columns="4">
					<level.Stat label="*ORDERS" value="{score_orders}" class="unimportant lowkey" />
					<level.Stat label="*TIPS" value="{score_tips}" class="unimportant lowkey" />
					<level.Stat label="*COLORMATCHES" value="{score_colormatches}" class="unimportant lowkey" />
					<level.Stat label="*EXTRAS" value="{score_extras}" class="unimportant lowkey" />
				</core.Widget>
				<core.Widget height="25" />
				<core.Widget class="stats_table" columns="1">
					<level.Stat label="*TOTALSCORE" value="{score} / {goal_0}" class="important bad lowkey" />
					<!--level.Stat label="*TOTALSCORE" value="{score}" class="important lowkey" />
					<level.Stat label="*GOALSCORE" value="{goal_0}" class="important lowkey" /-->
				</core.Widget>
				<core.Widget class="buttonbox" columns="2">
					<core.Widget text="*TRYAGAIN" class="button ok">
						<OnEvent id="MouseUp">
							core.Lib.scene.Restart(tryagain = True)
						</OnEvent>
					</core.Widget>
					<core.Widget text="*QUIT" class="button cancel">
						<OnEvent id="MouseUp">
							core.Lib.scene.ui.ExitConfirm()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
			<OnEvent id="FadeIn" with_params="False">
				if core.Lib.scene.endless_shift:
					(self >> 'GoalScore').visible = False
					(self >> 'Subtitle').visible = False
			</OnEvent>
		</core.Widget>
		
		<core.Widget
			id="BlinkingMessage"
			class="highlight_overlay"
			visible="False"
			transparency="0"
			notime="True"
			fader="darkness"
			nohover="True"
			soundin="goal">
			<core.Widget
				id="Window"
				position="0, 350"
				class="message_hot">
				<core.Widget
					class="light_streaks"
					image="ui/widgets/light_streaks"
					width="356"
					height="356"
					id="LightStreaks">
					<OnEvent id="Created">
						self.Attach(core.mod.Animator, type = 'rotate', speed = 0.05)
					</OnEvent>
				</core.Widget>
				<core.Widget 
					class="icon"
					image="ui/widgets/chest" />
				<core.Widget
					id="MessageText"
					class="message_text"
					text="Goal complete!" />
			</core.Widget>
			<OnTime sec="2.0">
				self.notime = True
				self.FadeOut()
			</OnTime>
		</core.Widget>

		<core.Widget
			id="AchievementMessage"
			fader="darkness"
			class="fullscreen"
			visible="false"
			nohover="true">
			<core.Widget
				id="Window"
				class="achievement achievement_award">
				<core.Widget class="title" id="Title" text="*ACHIEVEMENTUNLOCKED" />
				<core.Widget class="name" id="Name">
					<core.Widget class="contents" text="Lorem ipsum" id="Contents" />
				</core.Widget>
				<core.Widget class="stats_table reward_icon">
					<level.Stat id="RewardCoins" label="*REWARD" value="99" class="unimportant gold" />
				</core.Widget>
				<core.Widget 
					id="Description"
					class="description">
					<core.Widget 
						id="Text"
						class="inner"
						text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." />
				</core.Widget>
				<core.Widget
					class="icon"
					image="ui/widgets/light_streaks"
					position="-114,-114"
					width="356" height="356"
					transparency="0.75"
					id="LightStreaks">
					<OnEvent id="Created">
						self.Attach(core.mod.Animator, type = 'rotate', speed = 0.05)
					</OnEvent>
				</core.Widget>
				<core.Widget 
					class="icon"
					image="ui/widgets/achievements" 
					uv="0,0,0.125,0.25" 
					id="Icon" 
					number="0">
					<OnEvent id="UpdateIcon">
						import waiter
						self.uv = waiter.achievements[int(self.number)]
						self.position = -(self.width - 128) / 2, 0
					</OnEvent>
				</core.Widget>
			</core.Widget>
		</core.Widget>
		
		<core.Widget
			id="Options"
			visible="false"
			fader="darkness"
			class="darkness"
			pause_on_open="True"
			soundin="window_appear">
			<core.Widget class="window" id="Window">
				<core.Widget class="title" text="*PAUSED" />
				<core.Widget class="cross">
					<OnEvent id="MouseUp">
						self.window.FadeOut()
					</OnEvent>
				</core.Widget>
				<core.Widget class="restart">
					<OnEvent id="MouseUp">
						core.Lib.scene.ui.RestartConfirm()
					</OnEvent>
				</core.Widget>
				<core.Widget class="profiles">
					<core.Widget position="0,5" columns="2">
						<core.Widget text="*MUSIC" class="options" />
						<menu.ToggleButton value="core.Lib.sound.music_enabled" />
						<core.Widget text="*SOUND" class="options" />
						<menu.ToggleButton value="core.Lib.sound.sound_enabled" />
						<core.Widget text="*FULLSCREEN" class="options" />
						<menu.ToggleButton value="core.Lib.window.fullscreen" />
					</core.Widget>
				</core.Widget>
				<core.Widget 
					class="buttonbox"
					columns="2">
					<core.Widget 
						class="button ok"
						text="*RESUME">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
					<core.Widget 
						class="button cancel"
						text="*QUIT">
						<OnEvent id="MouseUp">
							core.Lib.scene.ui.ExitConfirm()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
		</core.Widget>
		
		<!--core.Widget
			id="TutorialConfirm"
			class="darkness"
			fadein="TutorialStarted"
			fader="darkness">
			<core.Widget id="Window" class="window window_small">
				<core.Widget text="*TUTORIAL" class="title"/>
				<core.Widget class="intro">
					<core.Widget text="*INTERACTIVEHELP" class="contents" />
				</core.Widget>
				<core.Widget
					class="buttonbox_small"
					columns="2">
					<core.Widget 
						class="button ok"
						text="*YES">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
							self.window._fader_tween.Finished += core.Lib.scene.LevelStarted
						</OnEvent>
					</core.Widget>
					<core.Widget 
						class="button cancel"
						text="*NO">
						<OnEvent id="MouseUp">
							core.Lib.scene.tutorial.skip_tutorial = True
							self.window.FadeOut()
							self.window._fader_tween.Finished += core.Lib.scene.LevelStarted
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
		</core.Widget-->
		
		<core.Widget
			id="Panel_ExitConfirm"
			class="darkness"
			fader="darkness"
			fadein="ExitConfirm">
			<core.Widget
				id="Window"
				class="window window_small">
				<core.Widget class="title bright" textshuffle="0.03" text="*QUITTOMENU" />
				<core.Widget id="Intro_1" class="intro">
					<core.Widget id="Content" class="contents" text="*QUITTOMENU_TEXT" />
				</core.Widget>
				<core.Widget id="ButtonBox" class="buttonbox" columns="2">
					<core.Widget text="*YES" class="ok button">
						<OnEvent id="MouseUp">
							core.Lib.scene.result = 'menu.Menu()'
						</OnEvent>
					</core.Widget>
					<core.Widget text="*NO" class="cancel button">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
		</core.Widget>
		
		
		<core.Widget
			id="Panel_RestartConfirm"
			class="darkness"
			fader="darkness"
			fadein="RestartConfirm">
			<core.Widget
				id="Window"
				class="window window_small">
				<core.Widget class="title bright" textshuffle="0.03" text="*RESTARTLEVEL" />
				<core.Widget id="Intro_1" class="intro">
					<core.Widget id="Content" class="contents" text="*RESTARTLEVEL_TEXT" />
				</core.Widget>
				<core.Widget id="ButtonBox" class="buttonbox" columns="2">
					<core.Widget text="*YES" class="ok button">
						<OnEvent id="MouseUp">
							core.Lib.scene.Restart()
						</OnEvent>
					</core.Widget>
					<core.Widget text="*NO" class="cancel button">
						<OnEvent id="MouseUp">
							self.window.FadeOut()
						</OnEvent>
					</core.Widget>
				</core.Widget>
			</core.Widget>
		</core.Widget>
		
		
		<core.Widget text="*SKIPLEVEL" class="button overlay" position="-420,0">
			<OnEvent id="MouseUp">
				core.Lib.scene.FakeValuesAndSave()
				core.Lib.scene.Proceed()
			</OnEvent>
			<OnEvent id="Created">
				if not core.developer:
					self.Hide()
			</OnEvent>
		</core.Widget>
		
		<core.Widget class="blackbar_left" />
		<core.Widget class="blackbar_right" />
	</ui>
	<scene>
		<level.Slot type="Visitor" position=" 25,580,0" id="FirstSlot"/>
		<level.Slot type="Visitor" position="100,580,0"/>
		<level.Slot type="Visitor" position="175,580,0"/>
		<level.Slot type="Visitor" position="250,580,0"/>
		<level.Slot type="Visitor" position="325,580,0"/>
		<level.Slot type="Visitor" position="400,580,0"/>
		
		<level.Slot id="WalkinSlot" type="WalkIn" position="150,-550,0" rotation="0,0,180"/>
		<core.Object id="WalkAwayTarget" position="50,-850,0" />
		<core.Object id="WalkInTarget" position="150,-750,0" rotation="0,0,180" />

		<level.Slot type="Order" position="525,360,0" id="OrderSlot_0" />
		<level.Slot type="Order" position="525,290,0" id="OrderSlot_1" />
		<level.Slot type="Order" position="525,220,0" id="OrderSlot_2" />
		<level.Slot type="Order" position="525,150,0" id="OrderSlot_3" />
		<!--level.Slot type="Order" position="525,80,0" id="OrderSlot_4" /-->

		<core.Object id="BarmanTarget" position="670,280,0" rotation="-0,-0,-0.92388,-0.382684" />

		<level.Slot type="Barman" position="640,250,0" rotation="0,0,-70" id="BarmanSlot"  />
		<level.Slot type="Waiter" position="450,400,0" rotation="0,0,-70" id="WaiterSlot"  />
		<level.Slot type="Catcher" position="-300,0,0" rotation="0,0,0.707107,0.707107" id="CatcherSlot"  />
	</scene>
</xml>
