require( "scripts/style.lua" );

kButtonSpacing = 3 + 64;
kButtonY = 18;
kButtonX = 656;

ProfileNameTextFont = {
  oldsansblackFont,
  48,
  RedTextColor
};


ItemToCollectFont = {
	oldsansblackFont,
	30,
	Color(0,0,0,255),
};

MinigameFont = {
	oldsansblackFont,
	40,
	Color(0,0,0,255),
};


-- Our game set up
MakeDialog
{
	-- Name the modal dialog
	name="beforeminigame",
	fit = true,
	Bitmap
	{
align=kHAlignLeft + kVAlignTop,
		x = 0,
		y = 0,
		name="backgroundimage",
		image="minigame/bg",
		fit = true;
		Planning
		{
align=kHAlignLeft + kVAlignTop,
			x = 0,
			y = 0,
			name = "minigame",
			fit=true;
			--[[
			Text
			{
				name = "remainingGoodManners",
				font = MinigameFont,
				x = 100,
				y = 205,
				w = 35,
				h = 35,
			},
			Text
			{
				name = "remainingEducation",
				font = MinigameFont,
				x = 100,
				y = 240,
				w = 35,
				h = 35,
			},
			--]]
			TableSelectable
			{
				xSpacement = 55,
				ySpacement = 55,
				xoffset = 1,
				yoffset = 1,
				name = "table",
				x = 316,
				y = 162,
			},
			Text
			{
				name = "remainingSchedule",
				font = MinigameFont,
				x = 134,
				y = 335,
				w = 100,
				h = 100,
				label = "#x 0",
			},
			Text
			{
				name = "remainingOrganization",
				font = MinigameFont,
				x = 134,
				y = 434,
				w = 100,
				h = 100,
				label = "#x 0",
			},
			Text
			{
				name = "remainingFun",
				font = MinigameFont,
				x = 134,
				y = 521,
				w = 100,
				h = 100,
				label = "#x 0",
			},
			SetStyle( MenuButtonStyle ),
			Button
			{
				name = "gamescreenmenu",
				x=893,
				y=43,
				graphics = SmallButton2Graphics,
				MenuButtonLabel(0, 0, 111, 26, "menu", oldsansblackFont, 20, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
				command=
					function()
						PauseGameMinigame();
						DisplayDialog{"scripts/ingamemenu.lua", action=ResumeGameMinigame};
					end
			},
			SetStyle( MenuButtonStyle ),
			Button
			{
				name = "skip",
				x=843,
				y=666,
				graphics = MediumButton1Graphics,
				MenuButtonLabel(0, 0, 143, 32, "minigameskip", oldsansblackFont, 20, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
				command =
					function()
						SetPlayedMiniGame();
						SwapToModal("scripts/gamescreen.lua");
						--[[
						EnableWindow("skip", false);
						EnableWindow("gamescreenmenu", false);
						if (StartCutsceneMiniGame()) then
							local gotocredits = ShouldGoToCreditsMiniGame();
							while IsCutscenePlayingMiniGame() do
								Yield();
							end
							if gotocredits then
								SwapToModal("scripts/credits.lua");
							else					
								SwapToModal("scripts/map.lua");
							end
						else
							DisplayDialog{"scripts/cutscenes/final.lua", nanny=GetSelectedNanny(), family=GetSelectedFamily(), credits=ShouldGoToCreditsMiniGame()};
						end
						--]]
					end,
			},
		},
		SetStyle(DialogBodyText),
		Text
		{
			name = "nannyadvice",
			label = "nanny_advice",
			x = 366,
			y = 64,
			w = 315,
			h = 67,
			font = MinigameFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		SetStyle(DialogBodyText),
		Text
		{
			name = "time",
			label = "time2",
			x = 833,
			y = 158,
			w = 178,
			h = 71,
			font = MinigameFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		SetStyle(DialogBodyText),
		Text
		{
			name = "itemstogo",
			label = "minigame_remaining_items",
			x = 35,
			y = 220,
			w = 247,
			h = 68,
			font = ItemToCollectFont,
			flags = kHAlignCenter+kVAlignCenter,
		}
	}
}
