
ButtonTextNormal=
{
    Font="but.fnt",
--	TextArea={38,18,103, 48},
	TextArea={38, 18, 103-6, 48},

    Colour={1,1,1,1};
    HAlign="center",
    SizeW=1,
    SizeH=1,
    SRatio=0.85,
};

ButtonTextOver=
{
    Font="but.fnt",
    --TextArea={38,18,103, 48},
	TextArea={38, 18, 103-6, 48},
    Colour={1,1,1,1};
    HAlign="center",
    SizeW=1,
    SizeH=1,
    SRatio=0.85,
};


ButtonTextPressed=
{
    Font="but.fnt",
	--TextArea={39,19,104, 49},
	TextArea={38+1, 18+1, 103-6+1, 48+1},
    Colour={1,1,1,1};
    HAlign="center",
    SizeW=1,
    SizeH=1,
    SRatio=0.85,
};

--Текст названия награды
ItemHeaderFont=
{
	Font		= "font04.fnt",
	TextArea	= {125, 5, 465, 40},
	Colour		= {1, 1, 1, 1};
	HAlign 		= "left",
	SRatio 		= 0.8,
};

--Текст описания награды
ItemDescriptionFont=
{
	Font 		= "font05.fnt",
	TextArea	= {125, 45, 475, 85},
	Colour		= {0.38, 0.26, 0.13, 1},
	VAlign		= "top",
	HAlign		= "left",
	SRatio		= 0.85,
	HRatio		=0.8,

};

ItemProgressFont=
{
	Font 		= "font05.fnt",
	TextArea	= {485, 89, 560, 101},
	Colour		= {0.38, 0.26, 0.13, 1},
	HAlign 		= "left",
	SRatio 		= 0.85,
	HAlign		= "center",
	--SizeW		= 0.85,
	--SizeH		= 0.85,
};

ItemPrizeFont=
{
	Font 		= "font04.fnt",
	TextArea	= {475, 35, 575, 65},
	Colour		= {1, 1, 1, 1},
	HAlign 		= "center",
	SRatio 		= 0.85,
};
--
FullPreviewFont=
{
	Font 		= "font04.fnt",
	TextArea	= {60, 80, 200, 99},
	Colour		= {1, 1, 1, 1},
	HAlign 		= "center",
	SRatio 		= 0.8,
	Caption		= "AchievementGui_All",
	--SizeW		= 0.7,
	--SizeH		= 0.7,
};

EnabledPreviewFont=
{
	Font 		= "font04.fnt",
	TextArea	= {213, 80, 395, 99},
	Colour		= {1, 1, 1, 1},
	HAlign 		= "center",
	SRatio 		= 0.8,
	Caption		= "AchievementGui_Obtained",
	--SizeW		= 0.7,
	--SizeH		= 0.7,
};

DisabledPreviewFont=
{
	Font 		= "font04.fnt",
	TextArea	= {414, 80, 614, 99},
	Colour		= {1, 1, 1, 1},
	HAlign 		= "center",
	SRatio 		= 0.8,
	Caption		= "AchievementGui_NotObtained",
	--SizeW		= 0.7,
	--SizeH		= 0.7,
};

AchievementGui=
{
	Pos = {144, 62},
	SrcRect = {0, 0, 760, 644},
	Image = "Win03.jpg",
	
	{
		Name="ACHIEV_TITLE_TEXT",
		Type="Text",    
		Caption="AchievementGui_Awards",
		Font="title.fnt",
		TextArea={267, 20, 481, 50},
		SRatio = 0.8,
		HAlign = "center",
		VAlign = "center",
		--SizeW  = 1.1,
		--SizeH  = 1.1,
	},
	
	{
        Name="ACHIEV_ACHIEVEMENTS_TEXT",
        Type="Text",    
        Caption="AchievementGui_ScoreStars",
        Font="font04.fnt",
        TextArea={62, 547, 309, 598},
		--Colour = {0.388, 0.4156, 0.6313, 1},
		Colour = {1, 1, 1, 1},
        SRatio = 0.75,
        SizeH = 1,
        SizeW = 1,
		HAlign="left",
	},
	
	{
        Name="ACHIEV_ACHIEVEMENTS_VALUE_TEXT",
        Type="Text",    
        Caption="",
        Font="font04.fnt",
        TextArea={303-15, 548, 442-15, 599},
		--Colour={0.388, 0.4156, 0.6313, 1},
		Colour = {1, 1, 1, 1},
        SRatio = 0.75,
        --SizeH = 1.2,
        --SizeW = 1.2,
		HAlign="left",
	},
	
	--slider
	{
		Name = "ACHIEV_SLIDER",
		Type = "Slider",
		Pos = {660,112},
		Image = "Win03.jpg",
		Track = {772, 112, 812, 539},
		Full = {772, 112, 812, 539},
		Thumb = {595, 645, 643, 723},
		Horizontal = 0,
	},
	--ok button
	{
		Name="ACHIEV_OK_BUTTON",
		Type="Button",
		Pos={570, 550},
		Image="Win02.jpg",
		Normal={511, 337, 643, 407},
		Over={650, 337, 783, 407},
		Pressed={789, 337, 923, 407},
		Caption="OK", 
		TextNormal=ButtonTextNormal,
		TextOver=ButtonTextOver,
		TextPressed=ButtonTextPressed,
	},

};

EnabledItemMount =
{
	Image = "Win03.jpg",
	SrcRect = {0, 770, 584, 897},
};

DisabledItemMount =
{
	Image = "Win03.jpg",
	SrcRect = {0, 897, 584, 1024},
};

DisabledItemQuad =
{
	Image = "Win03.jpg",
	SrcRect = {643, 645, 759, 756},
};

ProgressSprite =
{
	Image = "Win03.jpg",
	SrcRect = {598, 756, 764, 773},
};

BackProgressSprite =
{
	Image = "Win03.jpg",
	SrcRect = {598, 773, 764, 790},
};

ViewClipArea = 
{
	180, 180, 810, 595
};

FullPreviewMark =
{
	Image = "Win03.jpg",
	SrcRect = {0, 728, 596, 770},
};

EnabledPreviewMark =
{
	Image="Win03.jpg",
	SrcRect={0, 644, 596, 685},
};

DisabledPreviewMark =
{
	Image="Win03.jpg",
	SrcRect={0, 686, 596, 728},
};

FullPreviewArea = {193, 135, 353, 179};
EnabledPreviewArea = {352, 142, 555, 174};
DisabledPreviewArea = {554, 144, 777, 174};
 
AchievementsData=
{
	{
		Header = "AchievementGui_StarsUpgr",
		Description = "AchievementGui_Buy",
		
		--achievment: set/get in c++ code
		Prize = 500,
		MaxProgress = 1,
		Id = 0;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={0, 0, 98, 98},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={98, 0, 196, 98},
			},
		},			
	},
	
	
	{
		Header = "AchievementGui_wheat",
		Description = "AchievementGui_100wheat",
		--achievment: set/get in c++ code
		Prize = 180,
		MaxProgress = 100,
		Id = 1;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={196, 0, 294, 98},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={294, 0, 392, 98},
			},
		},			
	},
	
	{
		Header = "AchievementGui_cage",
		Description = "AchievementGui_thief",
		--achievment: set/get in c++ code
		Prize = 300,
		MaxProgress = 500,
		Id = 2;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={392, 0, 490, 98},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={0, 98, 98, 196},
			},
		},			
	},

	{
		Header = "AchievementGui_sunflowers",
		Description = "AchievementGui_125sunflowers",
		--achievment: set/get in c++ code
		Prize = 150,
		MaxProgress = 125,
		Id = 3;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={98, 98, 196, 196},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={196, 98, 294, 196},
			},
		},			
	},

	{
		Header = "AchievementGui_popularseller",
		Description = "AchievementGui_850buy",
		--achievment: set/get in c++ code
		Prize = 550,
		MaxProgress = 850,
		Id = 4;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={294, 98, 392, 196},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={392, 98, 490, 196},
			},
		},			
	},

	{
		Header = "AchievementGui_Potofgold",
		Description = "AchievementGui_50000gold",
		--achievment: set/get in c++ code
		Prize = 1250,
		MaxProgress = 500000,
		Id = 5;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={0, 196, 98, 294},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={98, 196, 196, 294},
			},
		},			
	},

	{
		Header = "AchievementGui_winer",
		Description = "AchievementGui_alllevels",
		--achievment: set/get in c++ code
		Prize = 1000,
		MaxProgress = 67,
		Id = 6;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={196, 196, 294, 294},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={294, 196, 392, 294},
			},
		},			
	},

	{
		Header = "AchievementGui_carrot",
		Description = "AchievementGui_200carrots",
		--achievment: set/get in c++ code
		Prize = 100,
		MaxProgress = 200,
		Id = 7;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={392, 196, 490, 294},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={0, 294, 98, 392},
			},
		},			
	},

	{
		Header = "AchievementGui_tomat",
		Description = "AchievementGui_150tomatoes",
		--achievment: set/get in c++ code
		Prize = 125,
		MaxProgress = 150,
		Id = 8;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={98, 294, 196, 392},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={196, 294, 294, 392},
			},
			
		},			
	},
	{
		Header = "AchievementGui_faster",
		Description = "AchievementGui_besttimelevel",

		--achievment: set/get in c++ code
		Prize = 200,
		MaxProgress = 1,
		MaxProgress = 1,
		Id = 9;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={294, 294, 392, 392},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={392, 294, 490, 392},
			},
		},
		useProgress = 0
	},

	{
		Header = "AchievementGui_potatoes",
		Description = "AchievementGui_120potatoes",
		--achievment: set/get in c++ code
		Prize = 175,
		MaxProgress = 120,
		Id = 10;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={0, 392, 98, 490},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={98, 392, 196, 490},
			},
		},			
	},

	{
		Header = "AchievementGui_Reward",
		Description = "AchievementGui_250bagsfly",
		--achievment: set/get in c++ code
		Prize = 350,
		MaxProgress = 250,
		Id = 11;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={196, 392, 294, 490},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={294, 392, 392, 490},
			},
		},			
	},

	{
		Header = "AchievementGui_ideal",
		Description = "AchievementGui_alllevelsgold",
		--achievment: set/get in c++ code
		Prize = 4500,
		MaxProgress = 1,
		Id = 12;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={392, 392, 490, 490},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={0, 490, 98, 588},
			},
		},			
	},

	{
		Header = "AchievementGui_funbuyers",
		Description = "AchievementGui_100buyers",
		--achievment: set/get in c++ code
		Prize = 300,
		MaxProgress = 1,
		Id = 13;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={98, 490, 196, 588},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={196, 490, 294, 588},
			},
		},
		useProgress = 0
	},
	{
		Header = "AchievementGui_Snail",
		Description = "AchievementGui_30minSnail",
		--achievment: set/get in c++ code
		Prize = 80,
		MaxProgress = 1,
		Id = 14;
		Image=
		{
			Enabled=
			{
				Image="table_rewards.jpg",
				SrcRect={294, 490, 392, 588},
			},
			Disabled=
			{
				Image="table_rewards.jpg",
				SrcRect={392, 490, 490, 588},
			},
		},
		useProgress = 0
	}
}

for i = 1, #AchievementsData, 1
do
	for j = i + 1, #AchievementsData, 1
	do
		if AchievementsData[i].Prize > AchievementsData[j].Prize
		then
			local achievementItem = AchievementsData[i]
			AchievementsData[i] = AchievementsData[j]
			AchievementsData[j] = achievementItem
		end
	end
end