--============================================================================
--  scramblegame.lua
--  Copyright (c) 2009, Bamtang Games. All Rights Reserved.
------------------------------------------------------------------------------

require( "scripts/style.lua" );

backHintImage = "images/gui/scramble/level_3/level_3.png";
if (gScrambleLevel == 1) then
	backHintImage = "images/gui/scramble/level_3/level_3.png";
end
if (gScrambleLevel == 2) then
	backHintImage = "images/gui/scramble/level_5/level_5.png";
end
if (gScrambleLevel == 3) then
	backHintImage = "images/gui/scramble/level_6/level_6.png";
end
if (gScrambleLevel == 4) then
	backHintImage = "images/gui/scramble/level_7/level_7.png";
end 

MakeDialog {
	-- Name the modal dialog
	name = "thegame",
	Bitmap {
		name = "backgroundimage",
		image = "images/gui/scramble/background",
		
		Bitmap {
			name = "bmpBackHint",
			image = backHintImage,
			x = 100,
			y = 25,
		},

		ScrambleWindow {
			x = 0,
			y = 0,
			w = 800, 
			h = 600,

            level = gScrambleLevel;

			SetStyle(ButtonStyle),
			
			Button
			{
				x = 601,
				y = 545,
				name = "btnPause",
				graphics = MenuButtonGraphics,
				cancel = true,
				command =
					function()
						DoModal("scripts/pause.lua");
					end
			},
			Bitmap {
			   name = "bmpSkipDisabled",
				image = gLocalizedPath.."images/buttons/ae_skip_i",
				x = 10,
				y = 545,
			},
			Button {
				x = 10,
				y = 545,
				name = "btnSkip",
				graphics = SkipButtonGraphics,
				cancel = true,
				command =
					function()
                        DoModal("scripts/skip_message.lua");
                        --
                        SendMessage("minigameSkipped");
                        SetState(kPause, false);
					end
			},
			WindowFx {
				name = "WindowFx";
				x=0; y=0; w=800; h=600;
				ParticleFile="assets/particles/fx_mn_scramble/fx_spk60.xml";
				ParticleX=409;
				ParticleY=245; --355;
			},
		},
		Text {
			name = "txtScrambleTitle",
			label = "ScrambleTitle";
			font = StandardButtonFont,
			x = 300, y = 525,
			w = 200, h = 30,
			flags = kHAlignCenter,
		},
	},

    FadeWindow {
        w = 800,
        h = 600,
        name = "FadeWindow",

        Bitmap {
            image = "images/panelblack",
            name = "bmpPanelBlack",
            x = 0,
            y = 0,
        }
    },
    WindowFx {
		x=0; y=0; w=800; h=600;
		name = "windowFx";
		ParticleFile="assets/particles/fx_mn_scramble/fx_spk60.xml";
		ParticleX=100;
		ParticleY=100;
    },
}
