function SliderClass.Get(O)local V=O._Spring.x if O.Inverted then V=1-V end return V end function SliderClass.Set(b,O,V)local i=b._Spring local I=math.clamp(O,0,1)if b.Interval>0 then I=math.floor(I/b.Interval+.5)*b.Interval end i.t=I i.instant=not V end function SliderClass.Destroy(O)O._Maid:Sweep()O.Changed=nil O.Clicked=nil O.StartDrag=nil O.StopDrag=nil O.Frame=nil end
-- Public Methods

function SliderClass:Get()
	local t = self._Spring.x
	if self.Inverted then
		t = 1 - t
	end
	return t
end

function SliderClass:Set(value, doTween)
	local spring = self._Spring
	local newT = math.clamp(value, 0, 1)

	if self.Interval > 0 then
		newT = math.floor((newT / self.Interval) + 0.5) * self.Interval
	end

	spring.t = newT
	spring.instant = not doTween
end

function SliderClass:Destroy()
	self._Maid:Sweep()
	--self.Frame:Destroy()
	self.Changed = nil
	self.Clicked = nil
	self.StartDrag = nil
	self.StopDrag = nil
	self.Frame = nil
end
