

-- by modelleicher
--

Menu_DAF = {};

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

function Menu_DAF:load(xmlFile)


	--  Info Hud --
	self.hudInfoPosX = 0.70;
    self.hudInfoWidth = 0.30;
    self.hudInfoPosY = 0.22;
    self.hudInfoHeight = 0.66;

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

	self.showhudInfo = false;


end;

function Menu_DAF:delete()

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

end;

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

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

function Menu_DAF:update(dt)

    if self:getIsActiveForInput() and self.isEntered then
    

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


   		

	end;			 

end;

function Menu_DAF:draw()


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

	if self.isMotorStarted then	g_currentMission:addExtraPrintText("KLAVESA NUM 0 MENU DAF XF 105");
	end;

end;

