require( "scripts/style.lua" );

LastTimeTextFont = {
  minionproFont,
  36,
  BlackColor
};


-- Our game set up
MakeDialog
{
	-- Name the modal dialog
	name="gamestatus",
	Bitmap
	{
align=kHAlignLeft + kVAlignTop,
		name = "bg",
		image = "gui/gamestatus/commom/stats_bg",
		x = 0,
		y = 0,
		alpha = 0.99,
	},
	GameStatus
	--Bitmap
	{
align=kHAlignLeft + kVAlignTop,
		type = "inter",
		--image = "backgrounds/gamestatus_bg",
		x = 0,
		y = 0,
		w = 1024,
		h = 768,
		alpha = 0.99,
		Text
		{
			name = "halfworkdonetext",
			x = 84,
			y = 149,
			w = 406,
			h = 48,
			font = {
				oldsansblackFont,
				48,
				RedTextColor
			},
			label = "halfworkdone",
			flags = kHAlignCenter + kVAlignCenter,
		},
		Text
		{
			name = "ranktext",
			x = 513,
			y = 178,
			w = 144,
			h = 40,
			font = {
				oldsansblackFont,
				40,
				RedTextColor
			},
			label = "rank",
			flags = kHAlignRight,
		},
		Text
		{
			name = "yourtimetext",
			x = 473,
			y = 107,
			w = 244,
			h = 40,
			font = {
				oldsansblackFont,
				40,
				RedTextColor
			},
			label = "yourtime",
			flags = kHAlignRight,
		},
		Text
		{
	  		name="lasttime",
	  		font = {
				oldsansblackFont,
				40,
				RedTextColor
			},
	  		x=734+61,
	  		y=92+17,
	  		w=120,
	  		h=50,
	  		flags = kHAlignLeft + kVAlignTop,
		},
		--[[
		Bitmap
		{
			name="gamestatuscongratperfect",
			image="gui/gamestatus/Perfect_time",
			x=150,
			y=165,
		},
		Bitmap
		{
			name="gamestatuscongratgood",
			image="gui/gamestatus/Good_time",
			x=176,
			y=165,
		},
		--]]
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "gamestatusok",
			x=618,
			y=621 + 60,
			graphics = BigButtonGraphics,
			MenuButtonLabel(0, 0, 255, 56, "ok", oldsansblackFont, 40, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			--close = true,
			command=
				function()
					EnableWindow("gamestatusok", false);
					--SwapToModal("scripts/map.lua");
					--[[
					if ShouldGoToMap() then
						CloseWindow();
						SwapToModal("scripts/map.lua");
					end
					--]]
					--[[
					if ShouldGoToMap() then
						while IsCutscenePlaying() do
							Yield();
						end
						QuitToMainMenu();
						DoMainWindow("scripts/map.lua");
					else
						CloseWindow();
					end
					--]]
					EnableWindow("gamestatus", false);
					if ShouldGoToMiniGame() then
						DisplayDialog{'scripts/familyend.lua'};
						EnableWindow("gamestatus", false);
						--QuitToMainMenu();
						--DoMainWindow("scripts/minigame.lua");
					else
						CloseWindow();
					end
				end
		},
		SetStyle(DialogBodyText),
		Text
		{
			name = "readynightshifttext",
			label = "readynightshift",
			x = 527,
			y = 528,
			w = 410,
			h = 40,
			font = {
				oldsansblackFont,
				40,
				RedTextColor
			},
			
			flags = kHAlignCenter+kVAlignTop,
		}
	}
}
