-----------------------------------------


-----------------------------------------
Environment = {}
Environment.timeSlider = nil
Environment.widget = guiManager:createWidget()

function Environment_buildWidget()
	
	Environment.widget:loadMainSheet("Environment.layout", "Environment/")
	
	Environment.widget:getMainWindow():setVisible(true)
	
	
	Environment.timeSlider = Environment.widget:getWindow("Time")
	Environment.timeSlider = CEGUI.toSlider(Environment.timeSlider)
	Environment.timeSlider:subscribeEvent("ValueChanged", "ModelEdit_zoom_ValueChanged")
	
end

function ModelEdit_zoom_ValueChanged(args)
	local timeValue = Environment.timeSlider:getCurrentValue()
	ModelEdit.renderer:setCameraDistance(zoomValue)
end

Environment_buildWidget()