-- ##############################################
-- #	Water Overlay Hud Script				#
-- #	version: v1.0							#
-- #	Date: 23.09.2013						#
-- #	author: [FSM]Chefkoch					#
-- #											#
-- # 	Keine Veränderung ohne					# 
-- # 	meine Erlaubnis!						#
-- # 	No modification without					# 
-- # 	my permission!							#
-- #											#
-- #	History:								#
-- #	v1.0 = Projekt started					#
-- #											#
-- ############################################## 

g_WaterHudDir = g_currentModDirectory;

waterHud = {};

function waterHud.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Attachable, specializations);
end;

function waterHud:load(xmlFile)
	if not g_currentMission.fillTypeOverlays[Fillable.FILLTYPE_WATER] then
		local overLay = g_currentMission.fillTypeOverlays[1];
		g_currentMission.fillTypeOverlays[Fillable.FILLTYPE_WATER] = Overlay:new("water", g_WaterHudDir.."Textures/waterHud.dds", overLay.x, overLay.y, overLay.width, overLay.height);
	end
end;

function waterHud:delete()
end;

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

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

function waterHud:update(dt)
end;

function waterHud:draw()
	if self.currentFillType ~= Fillable.FILLTYPE_UNKNOWN then
        g_currentMission:setFillTypeOverlayFillType(self.currentFillType);
    end;
end;