-- By PeterJ (30-11-2010)
-- Edit: Vinicius LS 

PainelInformacoes = {};

function PainelInformacoes.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Motorized, specializations);
end;

function PainelInformacoes:load(xmlFile)
	self.controlpath = Utils.getFilename("textures/InformacoesNH.dds", self.baseDirectory);
    self.helpPoxX = 0.87;
    self.helpPoxY = 0.28;
    self.helpWidth = 0.13;
    self.helpHeight = 0.45;
    self.helpOverlay = Overlay:new("info", self.controlpath, self.helpPoxX, self.helpPoxY, self.helpWidth, self.helpHeight);
    self.bcActive = true;
end;

function PainelInformacoes:keyEvent(unicode, sym, modifier, isDown)
		if isDown and sym == Input.KEY_r then
			self.bcActive = not self.bcActive;
	end;
end;

function PainelInformacoes:update(dt)
end;

function PainelInformacoes:draw()
	 if self.helpOverlay ~= nil then
		if self.bcActive then
		self.helpOverlay:render();
		end;
	end;
		if self.bcActive then	
			g_currentMission:addExtraPrintText("Key R: Esconder Manual");
		else
			g_currentMission:addExtraPrintText("Key R: Abrir Manual");
	end;
end;

function PainelInformacoes:onEnter()
end;

function PainelInformacoes:onLeave()
end;

function PainelInformacoes:delete()
end;

function PainelInformacoes:mouseEvent(posX, posY, isDown, isUp, button)
end;

function PainelInformacoes:validateAttacherJoint(implement, jointDesc, dt)
    return true;
end;