--============================================================================
--  goal_panel.lua
--  Copyright (c) 2010; Bamtang Games. All Rights Reserved.
------------------------------------------------------------------------------
require("scripts/style.lua");

SetState(kPause, true);

local dataGoal = "";
local descGoal = "";

if gGoal == 1 then
    dataGoal = "Goal Oriented Data 1";
    descGoal = "Goal Oriented Desc 1";
elseif gGoal == 2 then
    dataGoal = "Goal Oriented Data 2";
    descGoal = "Goal Oriented Desc 2";
elseif gGoal == 3 then
    dataGoal = "Goal Oriented Data 3";
    descGoal = "Goal Oriented Desc 3";
elseif gGoal == 4 then
    dataGoal = "Goal Oriented Data 4";
    descGoal = "Goal Oriented Desc 4";
end

function removeGoalPanel()
    SetState(kPause, false);
    PopModal("GoalPanel");
end

MakeDialog {
    name = "GoalPanel";

    wndGoalPanel {
        x = 0; y = 0; w = kMax; h = kMax;

        Bitmap {
            name = "bmpPanelBlack";
            image = "gpx/screens/transparent_background";
            alpha = true;
        };

        Bitmap {
            image = "gpx/screens/panel03";
            name = "bmpContainer";
            x = 272; y = 248;
            alpha = true;

            clsText {
                label = "Goal Oriented";
                font = Font40;
                Scale = 0.425;
                Space = -10;
                x = 39; y = 11; w = 352; h = 45;
                flags = kHAlignCenter + kVAlignCenter;
            };
            clsText {
                label = "Goal Stage";
                font = Font40;
                Scale = 0.425;
                Space = -10;
                x = 39; y = 56; w = 352; h = 45;
                flags = kHAlignCenter + kVAlignCenter;
            };

            Bitmap {
                image = "gpx/screens/trophy_icon_01";
                x = 4; y = 5;
                scale = 0.77;
            };
            Bitmap {
                image = "gpx/screens/trophy_icon_02";
                x = 354; y = 5;
                scale = 0.77;
            };

            Text {
                label = dataGoal;
                font = Font21;
                x = 21; y = 101; w = 388; h = 50;
                flags = kHAlignCenter + kVAlignCenter;
            };
            Text {
                label = descGoal;
                font = Font21;
                x = 21; y = 151; w = 388; h = 50;
                flags = kHAlignCenter + kVAlignCenter;
            };

            SetStyle(PanelButtonStyle);
            Button {
                x = 141; y = 212;
                name = "btnOk";
                label = "btnOk";
                command =
                    function()
                        gfn_OnBackGoalPanel();
                    end
            };
        };
    };
}
