@quenty/scrollingframe 12.12.0-canary.ae8d76d.0 → 12.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [12.12.0
|
|
6
|
+
# [12.12.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.4...@quenty/scrollingframe@12.12.0) (2025-05-10)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Features
|
|
10
10
|
|
|
11
|
-
* Add even more types ([
|
|
11
|
+
* Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/scrollingframe",
|
|
3
|
-
"version": "12.12.0
|
|
3
|
+
"version": "12.12.0",
|
|
4
4
|
"description": "Creates an inertia based scrolling frame that is animated and has inertia frames Alternative to a Roblox ScrollingFrame with inertia scrolling and complete control over behavior and style",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/loader": "10.
|
|
29
|
-
"@quenty/maid": "3.
|
|
30
|
-
"@quenty/signal": "7.
|
|
31
|
-
"@quenty/spring": "10.9.0
|
|
32
|
-
"@quenty/table": "3.
|
|
28
|
+
"@quenty/loader": "^10.9.0",
|
|
29
|
+
"@quenty/maid": "^3.5.0",
|
|
30
|
+
"@quenty/signal": "^7.11.0",
|
|
31
|
+
"@quenty/spring": "^10.9.0",
|
|
32
|
+
"@quenty/table": "^3.8.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
|
|
38
38
|
}
|
|
@@ -9,6 +9,6 @@ local require = require(script.Parent.loader).load(script)
|
|
|
9
9
|
local Table = require("Table")
|
|
10
10
|
|
|
11
11
|
return Table.readonly({
|
|
12
|
-
Vertical = { Direction = "y" }
|
|
13
|
-
Horizontal = { Direction = "x" }
|
|
14
|
-
})
|
|
12
|
+
Vertical = { Direction = "y" },
|
|
13
|
+
Horizontal = { Direction = "x" },
|
|
14
|
+
})
|
|
@@ -70,7 +70,7 @@ function ScrollModel:__index(index)
|
|
|
70
70
|
return (self._viewSize / self.TotalContentLength)
|
|
71
71
|
elseif index == "RenderedContentScrollPercentSize" then
|
|
72
72
|
local Position = self.Position
|
|
73
|
-
return self.ContentScrollPercentSize * (1-self:GetScale(self:_getTimesOverBounds(Position)))
|
|
73
|
+
return self.ContentScrollPercentSize * (1 - self:GetScale(self:_getTimesOverBounds(Position)))
|
|
74
74
|
elseif index == "ContentScrollPercent" then
|
|
75
75
|
return (self.Position - self._min) / (self.TotalContentLength - self._viewSize)
|
|
76
76
|
elseif index == "RenderedContentScrollPercent" then
|
|
@@ -87,9 +87,9 @@ function ScrollModel:__index(index)
|
|
|
87
87
|
local timesOverBounds = self:_getTimesOverBounds(position)
|
|
88
88
|
local scale = self:GetScale(timesOverBounds)
|
|
89
89
|
if timesOverBounds > 0 then
|
|
90
|
-
return -self.ContentMax - scale*self.BackBounceRenderRange
|
|
90
|
+
return -self.ContentMax - scale * self.BackBounceRenderRange
|
|
91
91
|
elseif timesOverBounds < 0 then
|
|
92
|
-
return self.ContentMin + scale*self.BackBounceRenderRange
|
|
92
|
+
return self.ContentMin + scale * self.BackBounceRenderRange
|
|
93
93
|
else
|
|
94
94
|
return -position
|
|
95
95
|
end
|
|
@@ -138,4 +138,4 @@ function ScrollModel:__newindex(index, value)
|
|
|
138
138
|
end
|
|
139
139
|
end
|
|
140
140
|
|
|
141
|
-
return ScrollModel
|
|
141
|
+
return ScrollModel
|
package/src/Client/Scrollbar.lua
CHANGED
|
@@ -62,7 +62,7 @@ end
|
|
|
62
62
|
function Scrollbar:UpdateRender()
|
|
63
63
|
if self._model.TotalContentLength > self._model.ViewSize then
|
|
64
64
|
local percentSize = self._model.RenderedContentScrollPercentSize
|
|
65
|
-
local pos = (1-percentSize) * self._model.RenderedContentScrollPercent
|
|
65
|
+
local pos = (1 - percentSize) * self._model.RenderedContentScrollPercent
|
|
66
66
|
|
|
67
67
|
if self._scrollType == SCROLL_TYPE.Vertical then
|
|
68
68
|
self.Gui.Size = UDim2.new(self.Gui.Size.X, UDim.new(percentSize, 0))
|
|
@@ -86,4 +86,4 @@ function Scrollbar:Destroy()
|
|
|
86
86
|
setmetatable(self, nil)
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
return Scrollbar
|
|
89
|
+
return Scrollbar
|
|
@@ -12,8 +12,8 @@ local RunService = game:GetService("RunService")
|
|
|
12
12
|
local UserInputService = game:GetService("UserInputService")
|
|
13
13
|
|
|
14
14
|
local Maid = require("Maid")
|
|
15
|
-
local ScrollModel = require("ScrollModel")
|
|
16
15
|
local SCROLL_TYPE = require("SCROLL_TYPE")
|
|
16
|
+
local ScrollModel = require("ScrollModel")
|
|
17
17
|
local Table = require("Table")
|
|
18
18
|
|
|
19
19
|
local ScrollingFrame = {}
|
|
@@ -200,8 +200,6 @@ function ScrollingFrame:_getInputProcessor(inputBeganObject: InputObject)
|
|
|
200
200
|
end
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
203
|
-- Binds input to a specific GUI
|
|
206
204
|
-- @return maid Maid -- To cleanup inputs
|
|
207
205
|
function ScrollingFrame:BindInput(gui, options)
|
|
@@ -228,9 +226,10 @@ function ScrollingFrame:StartScrolling(inputBeganObject, options)
|
|
|
228
226
|
return
|
|
229
227
|
end
|
|
230
228
|
|
|
231
|
-
if
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
if
|
|
230
|
+
inputBeganObject.UserInputType == Enum.UserInputType.MouseButton1
|
|
231
|
+
or inputBeganObject.UserInputType == Enum.UserInputType.Touch
|
|
232
|
+
then
|
|
234
233
|
local maid = Maid.new()
|
|
235
234
|
|
|
236
235
|
local startTime = tick()
|
|
@@ -290,7 +289,8 @@ function ScrollingFrame:StartScrollbarScrolling(scrollbarContainer, inputBeganOb
|
|
|
290
289
|
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
|
|
291
290
|
local direction = self._scrollType.Direction
|
|
292
291
|
local offset = (inputObject.Position - startPosition)[direction]
|
|
293
|
-
local percent = offset
|
|
292
|
+
local percent = offset
|
|
293
|
+
/ (scrollbarContainer.AbsoluteSize[direction] * (1 - self._model.ContentScrollPercentSize))
|
|
294
294
|
self._model.ContentScrollPercent = startPercent + percent
|
|
295
295
|
self._model.TargetContentScrollPercent = self._model.ContentScrollPercent
|
|
296
296
|
|
|
@@ -316,4 +316,4 @@ function ScrollingFrame:Destroy()
|
|
|
316
316
|
setmetatable(self, nil)
|
|
317
317
|
end
|
|
318
318
|
|
|
319
|
-
return ScrollingFrame
|
|
319
|
+
return ScrollingFrame
|