----------------------------------------------------------------------------------------------------

Events = 
{
	ClickEvent = 0,
	HintEvent = 1,
}

Education =
{
	{
		iGroup = 0;
		hintPos = {470+3, 186-2},
		eventType = Events.HintEvent,
		hintName = '_21hintEdu_1',
		startTime = 0.1,
--		lock=1,
	},
-----------------------------------------------------------------------------
	{
		iGroup = 1;
		hintPos = {685, 125-70},
		eventType = Events.ClickEvent,
		hintName = '_21hintEdu_2',
		startTime = 0.1,
--		lock=1
	},
--	{
--		iGroup = 1;
--		hintPos = {386, 189},
--		eventType = Events.ClickEvent,
--		hintName = '_21hintEdu_3',
--		startTime = -1.0,
--		lock=1,
--	},
-----------------------------------------------------------------------------
}

----------------------------------------------------------------------------------------------------

hintType = {}

hintType.bottomRight	= 0
hintType.bottomLeft		= 1
hintType.topRight		= 2
hintType.topLeft		= 3

emptyObj = nil

function copy(obj, template)
	obj = {}
	for key, value in pairs(template) do
		if(type(value) == 'table') then
			obj[key] = copy(obj[key], template[key])
		else
			obj[key] = value
		end 
	end
	
	return obj
end

hintCorners = 
{
	Image = "Icons.jpg",
	Animation  =
	{        
		FramesList =
		{	
			{553, 398, 602, 453}
		}
	}
};

FirstHint = 
{
	--hint window settings
	isClickable = 1,
	delay=0,
	windowStyle =
	{
		SrcRect          = {0, 313, 152, 465},
		Image            = "Icons.jpg",
		WinSize          = {220, 120},
		AngleScrSize     = {25, 25},
	},
	
	text = 
	{
		name			= "text",
		dataType		= "text",
		Caption 		= "super hint text",
		Font			= "font05.fnt",
		TextArea		= {0, 22, 220, 32},
		Colour			= {0, 0.0941, 0.27843, 1},
		SRatio 			= 0.78,
		HRatio 			= 0.8,
--		HAlign			= "center",
		VAlign			= "top",
		SizeW			= 1,
		SizeH			= 1,
	},
	
	hyperLink = 
	{
		name			= "hyperLink",
		dataType		= "text",
		Caption 		= "ClickToContinue",
		Font			= "font05.fnt",
		TextArea		= {30, 22, 220, 32},
		Colour			= {0.455, 0.587, 0.587, 1},
		SRatio 			= 0.75,
		HRatio 			= 0.8,
		--HAlign			= "center",
		VAlign			= "center",
		SizeW			= 0.8,
		SizeH			= 0.8,
	},
}

stepx=30
stepy=25

_21hintEdu_1 = {}
_21hintEdu_1.data = copy(emptyObj, FirstHint)
_21hintEdu_1.data.windowStyle.WinSize = {385, 120}
_21hintEdu_1.data.text.TextArea = {stepx, stepy, _21hintEdu_1.data.windowStyle.WinSize[1]-stepx, _21hintEdu_1.data.windowStyle.WinSize[2]-15}
_21hintEdu_1.data.text.HRation = 0.87
_21hintEdu_1.data.text.Caption = '_21hintEdu_1'
_21hintEdu_1.data.isClickable = 0
---------------------------------------------------------------
_21hintEdu_2 = {}
_21hintEdu_2.data = copy(emptyObj, FirstHint)
_21hintEdu_2.data.windowStyle.WinSize = {330, 100}
_21hintEdu_2.data.text.TextArea = {stepx-10, stepy, _21hintEdu_2.data.windowStyle.WinSize[1]-stepx+10, _21hintEdu_2.data.windowStyle.WinSize[2]-15}
_21hintEdu_2.data.text.Caption = '_21hintEdu_2'
--_21hintEdu_2.isCornered = 0
_21hintEdu_2.data.isClickable = 0

--_21hintEdu_3 = {}
--_21hintEdu_3.data = copy(emptyObj, FirstHint)
--_21hintEdu_3.data.windowStyle.WinSize = {320, 115}
--_21hintEdu_3.data.text.TextArea = {stepx-10, stepy, _21hintEdu_2.data.windowStyle.WinSize[1]-stepx+10, _21hintEdu_2.data.windowStyle.WinSize[2]-15}
--_21hintEdu_3.data.text.Caption = 'Чтобы купить товар нужно кликнуть на кнопку.'
--_21hintEdu_2.data.isClickable = 1

HintList = 
{
	'_21hintEdu_1',

	'_21hintEdu_2',
	--'_21hintEdu_3',
}

for k, v in pairs(HintList)
do
	item = _G[v]
	if item.data.isClickable ~= nil and item.data.isClickable == 1
	then
		item.data.hyperLink.TextArea = {30, item.data.windowStyle.WinSize[2] - 60, item.data.windowStyle.WinSize[1]-7, item.data.windowStyle.WinSize[2]}
	else
		item.data.hyperLink = nil

	end
end
