diff --git a/src/Component/Slider/ColdFusion.luau b/src/Component/Slider/ColdFusion.luau index 9257282..8f793b5 100644 --- a/src/Component/Slider/ColdFusion.luau +++ b/src/Component/Slider/ColdFusion.luau @@ -797,12 +797,22 @@ function Interface.new( inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then - inputState:Set(100 * (inputObject.Position.X - button.AbsolutePosition.X) / button.AbsoluteSize.X) + inputState:Set( + minState:Get() + + (maxState:Get() - minState:Get()) + * (inputObject.Position.X - button.AbsolutePosition.X) + / button.AbsoluteSize.X + ) end end)) maid:GiveTask(button.InputChanged:Connect(function(inputObject: InputObject) if inputObject.UserInputType == Enum.UserInputType.MouseMovement and isSelectedState:Get() then - inputState:Set(100 * (inputObject.Position.X - button.AbsolutePosition.X) / button.AbsoluteSize.X) + inputState:Set( + minState:Get() + + (maxState:Get() - minState:Get()) + * (inputObject.Position.X - button.AbsolutePosition.X) + / button.AbsoluteSize.X + ) end end)) local inst = _new("Frame")({ diff --git a/src/Component/Slider/_Config.story.luau b/src/Component/Slider/_Config.story.luau index dc05bb6..cf7de3e 100644 --- a/src/Component/Slider/_Config.story.luau +++ b/src/Component/Slider/_Config.story.luau @@ -71,7 +71,7 @@ return function(frame: Frame) end, 40, 0, - 100, + 50, nil, "Low", "High", @@ -121,7 +121,7 @@ return function(frame: Frame) end, 50, 0, - 100, + 150, nil, nil, nil, diff --git a/synthetic.rbxl.lock b/synthetic.rbxl.lock new file mode 100644 index 0000000..9008167 --- /dev/null +++ b/synthetic.rbxl.lock @@ -0,0 +1,5 @@ +117448 +RobloxStudioBeta +DESKTOP-UIAPQFM +faf3918c-cd67-4e9b-95e8-76107b83bc31 +