--
-- Autor: Hewaaa
-- Date: 24.01.2013
-- publisher: www.ls2013.org
--

T5_Hewaaas_Buedchen = {};

function T5_Hewaaas_Buedchen.prerequisitesPresent(specializations)
    return true; 
end;

function T5_Hewaaas_Buedchen:load(xmlFile)
	self.T5_Hewaaas_Buedchen = false;	
end;

function T5_Hewaaas_Buedchen:readStream(streamId, connection)
	
end;

function T5_Hewaaas_Buedchen:writeStream(streamId, connection)	
	
end;

function T5_Hewaaas_Buedchen:delete()
	
end;

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

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

function T5_Hewaaas_Buedchen:update(dt)
	
	if self:getIsActiveForInput() then
		if InputBinding.isPressed(InputBinding.T5_Hewaaas_Buedchen_1) then
			self:setAnimationTime(1, self.animationParts[1].currentPosition+(self.animationParts[1].offSet*(dt/10)));
		end;
		if InputBinding.isPressed(InputBinding.T5_Hewaaas_Buedchen_2) then
			self:setAnimationTime(1, self.animationParts[1].currentPosition-(self.animationParts[1].offSet*(dt/10)));
		end;

		if InputBinding.isPressed(InputBinding.T5_Hewaaas_Buedchen_3) then
			self:setAnimationTime(2, self.animationParts[2].currentPosition+(self.animationParts[2].offSet*(dt/10)));
		end;
		if InputBinding.isPressed(InputBinding.T5_Hewaaas_Buedchen_4) then
			self:setAnimationTime(2, self.animationParts[2].currentPosition-(self.animationParts[2].offSet*(dt/10)));
		end;

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

end;

function T5_Hewaaas_Buedchen:updateTick(dt)
end;

function T5_Hewaaas_Buedchen:draw()
	if not self.T5_Hewaaas_Buedchen then
		g_currentMission:addHelpButtonText(g_i18n:getText("T5_Hewaaas_Buedchen"), InputBinding.T5_Hewaaas_Buedchen);
	else
		renderText(0.78, 0.38, 0.02,  "Num 0: HUD Abschalten");
		renderText(0.78, 0.62, 0.02, 	  "Blinker Li.= KP_1");
    	renderText(0.78, 0.60, 0.02,     "Warnblinker = KP_2");
    	renderText(0.78, 0.58, 0.02,     "Blinker Re. = KP_3");
		renderText(0.78, 0.56, 0.02,     "RightDoor open = N");
		renderText(0.78, 0.54, 0.02,    "RightDoor close = J");
    	renderText(0.78, 0.52, 0.02,      "LeftDoor open = M");	
		renderText(0.78, 0.50, 0.02,     "LeftDoor close = K");
	end;
end;

function T5_Hewaaas_Buedchen:onLeave()
	self.T5_Hewaaas_Buedchen = false;	
end;