require("scripts/styles/mainmenustyle.lua")

MakeDialog 
{
	SetStyle(BackgroundStyle),
	
	BlgBitmap
	{
		x = kCenter,
		y = kCenter-2,
		image = "common/screens/screen_overlay",
	},
	
	SetStyle(BoxStyle),
	
	BlgBitmap
	{
		x = 0,
		y = 0,
		w = 1024,
		h = 800,
		positionMatrix = {x = 210, y = 161},
		image = "common/screens/stats/stats_box",
	},
				
	WndDeliveryTruckStats
	{
		name = "WndEndOfGameStats",
		w = kMax,
		h = kMax,
				
        SetStyle(PortraitStyle),
        
          BlgBitmap
        {
            name = "bmpJade",
            x = kCenter - 176,
            y = kCenter + 140,
            w = 300, h = 400,
            positionMatrix = {x = 69, y = 90},
            -- must be intialized with an image, otherwise it will not be properly placed
            image = "common/screens/stats/jade",
            delay = 15,
        },
        
        SetStyle(StatsTitleStyle),
        BlgText 
        {
            name = "txtStageCompletion",
            label = "",
            x = 340,
            y = 200, 
            w = 350, h = 60,
            flags = kHAlignCenter + kVAlignCenter,
        },
        
         SetStyle(StatsContentStyle),
        BlgText 
        {
            label = "tea_minigame_collect",
            x = kCenter,
            y = kCenter - 115, 
            w = 350, h = 60,
            flags = kHAlignCenter + kVAlignCenter,
        },
        
        BlgText 
        {
            label = "tea_minigame_bad_collect",
            x = kCenter,
            y = kCenter - 35, 
            w = 350, h = 60,
            flags = kHAlignCenter + kVAlignCenter,
            delay = 30,
        },
        
        BlgText 
        {
            label = "you_get",
            x = kCenter,
            y = kCenter + 52, 
            w = 350, h = 60,
            flags = kHAlignCenter + kVAlignCenter,
            delay = 60,
        },
        
--~         SetStyle(StatsTipStyle),

--~         BlgText 
--~         {
--~             name = "txtTips",
--~             label = "stats_meditation_tip_win",
--~             x = 350,
--~             y = 320,
--~             w = 380, h = 100,
--~             flags = kHAlignLeft + kVAlignTop,
--~             typewriter = true,
--~             typewriteEvery = 1,
--~             typewriteDelay = 0,
--~             fps = 60,
--~         },					

        SetStyle(StatsContentStyle),

        BlgBitmap
        {
            x = 450,
            y = 295,
            image = "level/deliverytruck/textures/teapack",
            delay = 0,
        },
        
        BlgBitmap
        {
            x = 510,
            y = 299,
            image = "common/screens/stats/icon_multiplier",
            delay = 10,
        },
        
	
	SetStyle(StatsDataStyle),
	
        BlgText 
        {
            name = "txtTeasGathered",
            label = "",
            x = 550,
            y = 295, 
            w = 200, h = 50,
            flags = kHAlignLeft + kVAlignTop,
            delay = 13,
        },
        
	    SetStyle(StatsContentStyle),
        BlgBitmap
        {
            x = 465,
            y = 375,
            image = "level/deliverytruck/textures/obstacle",
            delay = 30,
        },
        
        BlgBitmap
        {
            x = 510,
            y = 380,
            image = "common/screens/stats/icon_multiplier",
            delay = 40,
        },
	
        BlgBitmap
        {
            x = 455,
            y = 455,
            image = "common/stations/foodtable/1",
            delay = 60,
        },
        
        BlgBitmap
        {
            x = 510,
            y = 470,
            image = "common/screens/stats/icon_multiplier",
            delay = 70,
        },
        
	    SetStyle(StatsDataStyle),
        
        BlgText 
        {
            name = "txtCrashes",
            label = "",
            x = 550,
            y = 377, 
            w = 200, h = 50,
            flags = kHAlignLeft + kVAlignTop,
            delay = 43,
        },
        
        BlgText 
        {
            name = "txtTeasGained",
            label = "#0",
            x = 550,
            y = 467, 
            w = 200, h = 50,
            flags = kHAlignLeft + kVAlignTop,
            delay = 73,
        },
	
        
        SetStyle(InternalButtonStyle),			
        
        BlgButton
        {
            name= "btnContinue",
            label = "continue",
            x = 572, y = 506,
            width = 400, height = 200,
            positionMatrix = { x = 10, y = 10},
            graphics = {
                "common/screens/dialog_box/cancel_green",
                "",
                "",
                "",
            },
            default = true,
            command =
                function()
                    CloseWindow()
                end				
        },

        SetStyle(OrangeButtonStyle),
        
        BlgButton
        {
            name= "btnRetry",
            label = "retry",
            x = 403, y = 506,
            width = 400, height = 200,
            positionMatrix = { x = 10, y = 10},
            graphics = {
                "common/screens/dialog_box/confirm_red",
                "",
                "",
                "",
            },
            default = true,
            command =
                function()						
                ResetMinigame();
                    CloseWindow();			        	
                end				
        },			
    }
}
