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

SetState(kPause, true);

HeadFont = {
    titleFont,
    20,
    Color(252, 226, 115, 255)
};

BodyFont = {
    titleFont,
    18,
    Color(252, 226, 115, 255)
};

MakeDialog {
    name = "TutorialDialog";
    TutorialWindow {
        name = "TutorialWindow";
        x = 0; y = 0;
        w = 800; h = 600;

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

        Bitmap {
            name = "bmpPanelContainer";
            image = "images/gui/ae_panelselectplayer";
            x = kCenter;
            y = 26;
            Bitmap {
                image = gLocalizedPath.."images/ae_tutorial_title_02";
                name = "bmpTitle";
                x = kCenter;
                y = 68;
            };
            Bitmap {
                image = "images/tutorials/ae_tutorial_img01";
                name = "bmpTutorial";
                x = kCenter; y = 132;
            };
            Text {
                name = "txtBody";
                label = "#Text...";
                font = BodyFont;
                flags = kHAlignCenter;
                x = 81; y = 306;
                w = 400; h = 140;
            };

            SetStyle(ButtonStyle);
            Button {
                name = "btnContinue";
                graphics = ContinueButtonGraphics;
                x = 309;
                y = 458;
                command =
                    function()
                        if not ContinueTutorial() then
                            SetState(kPause, false);
                            PopModal("TutorialDialog");
                        end
                    end
            };
            Button {
                name = "btnBack";
                graphics = BackButtonGraphics;
                x = 64;
                y = 458;
                command =
                    function()
                        if not PrevTutorial() then
                            SetState(kPause, false);
                            PopModal("TutorialDialog");
                        end
                    end
            };
            Button {
                name = "btnOk";
                graphics = OkButtonGraphics;
                x = kCenter;
                y = 458;
                command = 
                    function()
                        SetState(kPause, false);
                        PopModal("TutorialDialog");
                    end
            };
        };
    };
}
