

-- by modelleicher
--

ak_InfoPanel = {};

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

function ak_InfoPanel:load(xmlFile)


	--  Info Hud --
	self.hudInfoPosX = 0.012;
    self.hudInfoWidth = 0.4-0.012;
    self.hudInfoPosY = 1-0.99;
    self.hudInfoHeight = 0.3;

	self.infoPanelInfoPath = Utils.getFilename("hud_info_base.png", self.baseDirectory);
	self.hudInfoOverlay = Overlay:new("hudInfoOverlay", self.infoPanelInfoPath, self.hudInfoPosX, self.hudInfoPosY, self.hudInfoWidth, self.hudInfoHeight);

	self.showhudInfo = false;


end;

function ak_InfoPanel:delete()

     	--  Info Hud --
    if self.hudInfoOverlay ~= nil then
		self.hudInfoOverlay:delete();
	end;

end;

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

function ak_InfoPanel:keyEvent(unicode, sym, modifier, isDown)
end;

function ak_InfoPanel:update(dt)

    if self:getIsActiveForInput() and self.isEntered then
    

		if InputBinding.hasEvent(InputBinding.InfoPanel01) then
		    self.showhudInfo = not self.showhudInfo;
		end;
		


   		

	end;			 

end;

function ak_InfoPanel:draw()


  	if self.showhudInfo and self.isEntered then
		self.hudInfoOverlay:render();
	end;

	if self.isMotorStarted then	g_currentMission:addExtraPrintText("Klavesa Num 0 Fendt Info panel");
	end;

end;

