-------------------------------------------------------------------------------
class 'AboutMatch3Ability' (Node)
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
function AboutMatch3Ability:__init(match3)   
    Node.__init(self, match3.zoom:getMainEntity(), 'AboutMatch3Ability', 1000)  
    self.screen 	= match3.zoom
    self.field 		= match3.field
    self.panel 		= match3.panel

    self:loadData(self)  

    self:init()  
end
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
function AboutMatch3Ability:onOkButtonClick()
	self:hideScreen()	
end
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
function AboutMatch3Ability:hideScreen()
	self.field.bActive = true
	self.panel.bActive = true

	self.main_entity:hide()
	self.main_entity:destroy()
end
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
function AboutMatch3Ability:showScreen()
	self.main_entity:show()
end
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
function AboutMatch3Ability:init()	
	self.field.bActive 	= false
	self.panel.bActive 	= false	

	self.main_entity:setXY(-512, -420)    
    self:getEntityNamed('bttn_ok').onPress:add(bind(self.onOkButtonClick, self))    
end
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
function AboutMatch3Ability:loadData()
    if self.CreateLoaderTable then
        local table_resource = self:CreateLoaderTable()
        LoadScene(self.main_entity, table_resource)
    end 
end
-------------------------------------------------------------------------------

--------------------------------------------------------------------------------
--                      GENERATED CONTENT. DO NOT EDIT.                       --
--------------------------------------------------------------------------------

function AboutMatch3Ability:CreateLoaderTable()
	local objects =
	{
		{ name = 'window_border_small',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Match3/Helps/window_border_small.png',  width = 400,  height = 482,  },
		{ name = 'match3_title',  entityType = 'SpriteEntity',  parentName = 'window_border_small',  x = 0,  y = -203,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Match3/Helps/match3_title.png',  width = 150,  height = 18,  },
		{ name = 'bttn_ok',  entityType = 'ButtonEntity',  parentName = 'window_border_small',  x = 0,  y = 234,  order = 2,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/GUI/Buttons/bttn_ok.png',  text = '',  },
		{ name = 'text_ability_info',  entityType = 'TextEntity',  parentName = 'window_border_small',  x = 0,  y = 41,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  localizationKey = 'MATCH3_ABILITY_INFO_TEXT_EXPLOSIVE',  height = 23,  boundsX = 289,  boundsY = 0,  },
		{ name = 'layer_arrow',  entityType = 'SpriteEntity',  parentName = 'window_border_small',  x = 0,  y = -92,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Match3/Helps/abilities/layer_arrow.png',  width = 36,  height = 30,  },
		{ name = 'layer_small_no_eye',  entityType = 'SpriteEntity',  parentName = 'window_border_small',  x = 84,  y = -97,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Match3/Helps/abilities/small_ico/layer_small_no_eye.png',  width = 60,  height = 60,  },
		{ name = 'layer_big_explosive',  entityType = 'SpriteEntity',  parentName = 'window_border_small',  x = -100,  y = -94,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Match3/Helps/abilities/big_ico/layer_big_explosive.png',  width = 130,  height = 130,  },
	}
	return objects
end
