--
-- Specialization for farmer car mod
--
-- @author  Stefan Geiger
-- @date  10/01/09
--
-- Copyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved.
--
-- Specialization for Blinker mod
--
-- @autor Sebastian B. (Edit StianBY)
-- @update 01/12/10
--

wheels = {};

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

function wheels:load(xmlFile)

    self.twinVL = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.twinVL#index"));
    self.twinVR = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.twinVR#index"));
    self.twinHL = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.twinHL#index"));
    self.twinHR = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.twinHR#index"));

end;

function wheels:delete()
end;

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

function wheels:keyEvent(unicode, sym, modifier, isDown)

     if isDown and sym == Input.KEY_u then
		self.dualwheels = not self.dualwheels;
		setVisibility(self.twinVL, self.dualwheels);
		setVisibility(self.twinVR, self.dualwheels);
        setVisibility(self.twinHL, self.dualwheels);
		setVisibility(self.twinHR, self.dualwheels);			
	end;
    

	-- Anfang Info Panel 
	if isDown and sym == Input.KEY_KP_0 then
        self.helpPanel = not self.helpPanel;
    end;
	-- Ende Info Panel
end;

function wheels:update(dt)
end;

function wheels:draw()

		if not self.helpPanel then
            renderText(0.80, 0.22, 0.021, "");
        else
            renderText(0.80, 0.22, 0.021, "");
        end;
        
        if self.helpPanel then
            renderText(0.80, 0.50, 0.02, "- Case 5140 MAXXUM -");
			renderText(0.78, 0.48, 0.02, "Key NUM_8: Worklights Rear");
			renderText(0.78, 0.46, 0.02, "Key NUM_5: Worklights Front");
			renderText(0.78, 0.44, 0.02, "Key u: Twin wheels on/off");
			renderText(0.78, 0.42, 0.02, "Key Home: Beacon on/off");
			renderText(0.78, 0.40, 0.02, "Key PgUp/PgDw: ESlimiter");
                       
			
		end;
	
end;

function wheels:onLeave()
end;