dofile('Data/Scripts/Common/Screens/MoreInfoScreenBase.lua')

class 'MoreInfoScreen' (MoreInfoScreenBase)

function MoreInfoScreen:__init(name)
    MoreInfoScreenBase.__init(self, name)
    self:getMainEntity().onPress:add(bind(self.onOkButtonClick, self))
    self.timer:add( function()
						self:addHotKey(ERSK_ESCAPE, bind(self.onOkButtonClick, self))
					end, 0.5)
end
--------------------------------------------------------------------------------

function MoreInfoScreen:setupButtons()
	local obj_back = self:getMainEntity():getEntityNamed('MoreInfo')
	
	if self:hasEntityNamed('bttn_ok') then
		local bttn = self:getEntityNamed('bttn_ok')
		bttn.onPress:add(bind(self.onOkButtonClick, self))
		bttn:setSFXTrackOnPress( getCommonSoundEntity('ButtonClick') )
	end

	if self:hasEntityNamed('bttn_forums') then
		local bttn = self:getEntityNamed('bttn_forums')
		bttn.onPress:add(bind(self.onForumButtonClick, self))
		
		bttn:setSFXTrackOnPress( getCommonSoundEntity('ButtonClick') )
	end

	if self:hasEntityNamed('bttn_credits') then
		local bttn = self:getEntityNamed('bttn_credits')
		bttn.onPress:add(bind(self.onCreditsButtonClick, self))
		bttn:setSFXTrackOnPress( getCommonSoundEntity('ButtonClick') )
	end

	if self:hasEntityNamed('bttn_strategy_guide') then
		local bttn = self:getEntityNamed('bttn_strategy_guide')
	--	bttn.onPress:add(bind(self.onStrategyGuideButtonClick, self))
		bttn:setSFXTrackOnPress( getCommonSoundEntity('ButtonClick') )
	end

	if self:hasEntityNamed('bttn_help') then
		local bttn = self:getEntityNamed('bttn_help')
		bttn.onPress:add(bind(self.onHelpButtonClick, self))
		bttn:setSFXTrackOnPress( getCommonSoundEntity('ButtonClick') )
	end
end
--------------------------------------------------------------------------------
function MoreInfoScreen:onHelpButtonClick()
	createHelpScreen()
end
--------------------------------------------------------------------------------
--                      GENERATED CONTENT. DO NOT EDIT.                       --
--------------------------------------------------------------------------------

function MoreInfoScreen:CreateLoaderTable()
	local objects =
	{
		{ name = 'BGND',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Screens/MoreInfo/BGND.png',  width = 400,  height = 482,  },
		{ name = 'more_info_txt',  entityType = 'SpriteEntity',  parentName = 'BGND',  x = 0,  y = -208,  order = 0,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Screens/MoreInfo/more_info_txt.png',  width = 94,  height = 16,  },
		{ name = 'bttn_forums',  entityType = 'ButtonEntity',  parentName = 'BGND',  x = 0,  y = -123,  order = 2,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Screens/MoreInfo/Forum_Button.png',  text = '',  },
		{ name = 'bttn_strategy_guide',  entityType = 'ButtonEntity',  parentName = 'BGND',  x = 0,  y = -40,  order = 2,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Screens/MoreInfo/StrategyGuide_Button.png',  text = '',  activeRectX = 218,  activeRectY = 82,  },
		{ name = 'bttn_credits',  entityType = 'ButtonEntity',  parentName = 'BGND',  x = 0,  y = 46,  order = 2,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Screens/MoreInfo/Credits_Button.png',  text = '',  activeRectX = 218,  activeRectY = 82,  },
		{ name = 'bttn_ok',  entityType = 'ButtonEntity',  parentName = 'BGND',  x = 0,  y = 232,  order = 2,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/GUI/Buttons/bttn_ok.png',  text = '',  activeRectX = 218,  activeRectY = 82,  },
	}
	return objects
end
