--============================================================================
--  youwin_scramble.lua
--  Copyright (c) 2009, Bamtang Games. All Rights Reserved.
------------------------------------------------------------------------------
require( "scripts/style.lua" );

BodyFont = {
    textFont, 
    16,
    Color(252, 226, 115, 255)
};

Scramble_BonusTimedY = 175;
Scramble_BonusRelaxedY = 150;

SetState(kPause, true);
InsideGame(false);

MakeDialog {
    -- Name the modal dialog
    name = "YouWinDialog";

    YouWinScrambleWnd {
        name = "YouWinScrambleWnd";
        x = 0; y = 0;
        w = 800; h = 600;

        bonusTimedY = Scramble_BonusTimedY;
        bounsRelaxedY = Scramble_BonusRelaxedY;

        Bitmap {
            name = "bmpPanelBlack";
            image = "images/gui/ae_background";
            alpha = true;
            x = 0; y = 0;
            w = 800; h = 600;
        };

        Bitmap {
            name = "bmpPanelContainer";
            image = "images/gui/ae_paneloptions";
            x = kCenter;
            y = 154;

            Bitmap {
                name = "bmpTitle";
                image = gLocalizedPath.."images/ae_congratulations";
                x = kCenter;
                y = 68;
            };

            Text {
                name = "lblRemaining",
                x = 112, y = 145,
                w = 150, h = 30,
                font = DialogTitleFont,
                label = "lblRemaining";
                flags = kHAlignRight + kVAlignCenter,
            };
            Text {
                name = "txtRemaining",
                x = 254, y = 145,
                w = 100, h = 30,
                font = DialogTitleFont,
                label = "#120";
                flags = kHAlignCenter + kVAlignCenter,
            };

            Text {
                name = "lblActivityScore",
                x = 111, y = Scramble_BonusTimedY,
                w = 150, h = 30,
                font = DialogTitleFont,
                label = "lblHintBonus";
                flags = kHAlignRight + kVAlignCenter,
            };
            Text {
                name = "txtScore",
                x = 254, y = Scramble_BonusTimedY,
                w = 100, h = 30,
                font = DialogTitleFont,
                label = "#2112";
                flags = kHAlignCenter + kVAlignCenter,
            };


            SetStyle(ButtonStyle);
            Button {
                name = "btnContinue";
                graphics = ContinueButtonGraphics;
                x = kCenter;
                y = 226;
                command = 
                    function()
                        gainTrophy = SendMessage("minigameCompleted");
						showGainTrophy(gainTrophy);
                        PopModal("YouWinDialog");
                    end
            };
            
        };
    };
};
