require( "scripts/gameparams.lua" );


function GetSectionForLoading()
    return SectionForLoading;
end
function GetSectionForUnloading()
    return SectionForUnloading;
end

if( StartUpLoading == true)then
    SectionForLoading = {"normal"};   
    if(  gGlobalPlayerInfo and gGlobalPlayerInfo.gCurrentFarm 
        and gGlobalPlayerInfo.gCurrentFarm>0) then
        SectionForLoading[2] = "farm_"..gGlobalPlayerInfo.gCurrentFarm;    
    end;        

    StartUpLoading = nil;
end
    

MakeDialog
{   name="theloading",
    Loader
    {
    	SectionForLoading = GetSectionForLoading();
    	SectionForUnloading = GetSectionForUnloading();
    
        Bitmap
        { 
            name="backgroundimage",
            image="backgrounds/loading",   --loading",
            x=0,
            y=0,
            Bitmap
            { 
                name="grayimage",
                image="backgrounds/gloading",  --gloading",
                x=0,
                y=0,
            },
            
            
            ProgressBar
            {
                Background = "slider/back",
                Foreground = "slider/front",
                name = "LoadingProgressing",
                x = 200,
                y = 550,
            }
        }
    }
}
