layoutCar2Glovebox.mExits =
{
}

layoutCar2Glovebox.mPOIs = 
{
}

layoutCar2Glovebox.mHOs = 
{
	[objectHoTrunkKey] = 
	{
		siblings = {objectHoTrunkKeyLit},
	},
}

layoutCar2Glovebox.mIOs =
{
	[objectIoGlovebox] =
	{
		links = {objectHoChisel}
	}
}
-- ----------------------------------------------------------------------------
function layoutCar2Glovebox:onConstruct()
	
	Layout.onConstruct(self)
	
end
-- ----------------------------------------------------------------------------
function layoutCar2Glovebox:onInitialize()

	Layout.onInitialize(self)
	
	objectGloveboxOpen:ss(kInactive)

end
-- ----------------------------------------------------------------------------
function layoutCar2Glovebox:onUsedAll(object, props)
	
	if (object == objectIoGlovebox) then
		
		objectGloveboxOpen:setAlpha(0)
		objectGloveboxOpen:ss(kLocked)		
		objectGloveboxOpen:animate("openGlovebox_blocking",
			{ alpha=0									},
			{ alpha=1,		duration=kTimeFadeSwitch	}
		)
		
		objectIoGlovebox:ss(kIdle)		
		objectIoGlovebox:animate(
			{ alpha=0,		duration=kTimeFadeSwitch	}
		)
		
		return true		
	end
	
	return Layout.onUsedAll(self, object, props)

end
-- ----------------------------------------------------------------------------
function layoutCar2Glovebox:onClickHO(object, x, y)

	if (object == objectHoTrunkKey) then
		objectPoiGloveBoxOpen:ss(kDone)
		objectPoiGloveBoxOpenNoKey:ss(kActive)
	end	
	
	return Layout.onClickHO(self, object, x, y)

end
-- ----------------------------------------------------------------------------
function layoutCar2Glovebox:onAnimationFinish(animationName)
	
	Layout.onAnimationFinish(self, animationName)
	
	if (animationName == "openGlovebox_blocking") then
		
		objectIoGlovebox:ss(kDone)
		-- update car2:
		objectPoiGloveBoxClosed:ss(kDone)
		objectPoiGloveBoxOpen:ss(kActive)
		
	end
	
end
