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

class 'InteractiveHelpScreen' (InteractiveHelpScreenBase)

function InteractiveHelpScreen:__init(name)
     InteractiveHelpScreenBase.__init(self, name)
end
 
function InteractiveHelpScreen:createArrow(x, y, angle)
    local arrow = CreateSpriteEntity('Data/Textures/Screens/InteractiveHelp/TutorialArrow.png')
    arrow:attachTo( self:getMainEntity() )
    arrow:setName('TutorialArrow')
    arrow:setColor(0.133, 1, 0.133, 1)
    arrow:setHotSpot(64, 16)
    arrow:setScale(2.5)
    arrow:setRotationRad(angle)
    arrow:setXY(x, y)
    arrow:setRespondable(false)
    arrow:setOrder(1000)
    return arrow
end

function InteractiveHelpScreen:onScreenDestroy()
    ----------------hack for APPLY RAVEN TUTORIAL
    if PopUpScreensMgr:GetTop().name ~= 'l_Raven' then
	    PopUpScreensMgr:pop()
	end
	-------------
	
	if self.forced_object then
		current_scene:getPlayField():setForcedObject(nil)
	end
	if self.confirmCallback then
		self.confirmCallback()
	end
	if self.forced_object_connection then
		self.forced_object_connection:remove()
		self.forced_object_connection = nil
	end
	AddGameState(InteractiveHelp.States.HELP_SHOWN, self.messageTextAlias)
	InteractiveHelp.tutorialScreen = nil
end



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

function InteractiveHelpScreen:CreateLoaderTable()
	local objects =
	{
		{ name = 'InteractiveHelpWindow',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  isRespondable = false,  scale = 0.9,  editingLocked = false,  treeItemIsExpanded = true,  hotSpotX = 319, hotSpotY = 136,  texturePath = 'Data/Textures/Screens/InteractiveHelp/InteractiveHelpWindow.png',  width = 638,  height = 271,  },
		{ name = 'textMessage',  entityType = 'TextEntity',  parentName = 'InteractiveHelpWindow',  x = -28.3333,  y = -34,  order = 30,  color = {r = 0.0470588, g = 0.0470588, b = 0.352941, a = 1},  editingLocked = false,  treeItemIsExpanded = true,  text = 'textMessage',  font = 'Data/Fonts/cyrillic.fnt',  height = 29,  boundsX = 400,  boundsY = 140,  },
		{ name = 'textInstruction',  entityType = 'TextEntity',  parentName = 'InteractiveHelpWindow',  x = -39.5555,  y = 92.6667,  order = 40,  editingLocked = false,  treeItemIsExpanded = true,  text = 'new text',  font = 'Data/Fonts/cyrillic.fnt', height = 20,  boundsX = 350,  boundsY = 0,  },
		{ name = 'bttn_skip_tutorial',  entityType = 'ButtonEntity',  x = 947,  y = 23,  order = 15,  editingLocked = false, treeItemIsExpanded = true,  texturePath = 'Data/Textures/Screens/InteractiveHelp/SkipTutorialButton.png',  },
	}
	return objects
end
