
.namespace hotspottrad

function OnActivate()
	
		for y=1,5 do 
		
			blatte = OPUnitFactory.GetUnit("cible"..tostring(y))
			if self.Name == "cibleHotspot"..tostring(y) and blatte.texte==" " then
				blatte.texte=tostring(Draggedpaper.texte)
				blatte.Children[0].Text=tostring(blatte.texte)
				Draggedpaper.texte=" "
				Draggedpaper.Enabled=false
				Draggedpaper.Position_X=0
				Draggedpaper.Position_Y=0
				PlaySoundEffect("gmp_addword")
			elseif self.Name == "cibleHotspot"..tostring(y) and blatte.texte~=" " then
				Draggedpaper.Enabled=true
				Draggedpaper.texte=blatte.texte
				blatte.texte=" "
				blatte.Children[0].Text=tostring(blatte.texte)
			end
		end
	
		if self.Name == "pageup" and page~=7 then
			page=page+1
			chgpg=1
		end
		
		if self.Name == "pagedown" and page~=1 then
			page=page-1
			chgpg=1
		end
	
		if self.Name == "validerHotspot" then
			valid=1
		end
		
		if self.Name == "cancel1" or self.Name == "cancel2" then
			Draggedpaper.texte=" "
			Draggedpaper.Enabled=false
			Draggedpaper.Position_X=0
			Draggedpaper.Position_Y=0
		end
end



function OnEnable()
	AreaHotspot.OnEnable()
end

function GetSpecificCursor()
	if self.Name == "cancel1" or self.Name == "cancel2" then
		return 0
	else
		return CURSOR_AREA_HOTSPOT
	end
end

function PrivateCanClickOn()
	return true
end

