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

class 'HOPanel' (HOPanelBase)

function HOPanel:__init(panel)
    HOPanelBase.__init(self, panel, 3)
end
-------------------------------------------------------------------------------

function HOPanel:addExit()
	local size = Vector2f(672, 70)
		
	self.areaExit = CreateSpriteEntity('')
	self.areaExit:setName			( 'area_link_exit_from_ho' )
	self.areaExit:attachTo			( self.game_scene:getHOPanel():getMainEntity() )
	self.areaExit:setAnimationSize	( size )
	self.areaExit:setXY				( WORK_W/2,  WORK_H - size.y/2 )
	self.areaExit:setColor			( Colorf(1, 1, 1, 0.01) )
	self.areaExit:setOrder			( 1500 )
	self.areaExit:setCursorOverName	( 'CursorDown' )
	self.areaExit.onClickBegin:add	( bind(self.onCloseClicked, self) )
end
-------------------------------------------------------------------------------

function HOPanel:onCloseClicked(target, screenFocus)
    local level = self.game_scene:getPlayField()

	if level.match3 and level.match3.field then
		level.match3.field:unregisterEvents()
	end

	HOPanelBase.onCloseClicked(self, target, screenFocus)
end

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

function HOPanel:CreateLoaderTable()
	local objects =
	{
	}
	return objects
end
