@quenty/scrollingframe 12.18.0 → 12.19.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 +21 -301
- package/package.json +3 -3
- package/src/Client/ScrollModel.lua +42 -11
- package/src/Client/Scrollbar.lua +37 -11
- package/src/Client/ScrollingFrame.lua +67 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,605 +3,325 @@
|
|
|
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.
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @quenty/scrollingframe
|
|
6
|
+
# [12.19.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.18.1...@quenty/scrollingframe@12.19.0) (2026-07-14)
|
|
9
7
|
|
|
8
|
+
### Bug Fixes
|
|
10
9
|
|
|
10
|
+
- **lint:** resolve selene and moonwave issues from strict conversions ([d427005](https://github.com/Quenty/NevermoreEngine/commit/d42700569ecb085fee4166c5bfdad382dd8442c2))
|
|
11
11
|
|
|
12
|
+
### Features
|
|
12
13
|
|
|
14
|
+
- **scrollingframe:** convert package to --!strict ([bd5908a](https://github.com/Quenty/NevermoreEngine/commit/bd5908afefafaaa181cb1d72a85176d1838adcfa))
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
## [12.18.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.18.0...@quenty/scrollingframe@12.18.1) (2026-05-30)
|
|
15
17
|
|
|
16
18
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
17
19
|
|
|
20
|
+
# [12.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.17.0...@quenty/scrollingframe@12.18.0) (2026-04-23)
|
|
18
21
|
|
|
22
|
+
**Note:** Version bump only for package @quenty/scrollingframe
|
|
19
23
|
|
|
24
|
+
# [12.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.16.0...@quenty/scrollingframe@12.17.0) (2026-02-20)
|
|
20
25
|
|
|
26
|
+
**Note:** Version bump only for package @quenty/scrollingframe
|
|
21
27
|
|
|
22
28
|
# [12.16.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.15.0...@quenty/scrollingframe@12.16.0) (2026-02-19)
|
|
23
29
|
|
|
24
30
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
32
|
# [12.15.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.14.1...@quenty/scrollingframe@12.15.0) (2026-02-17)
|
|
31
33
|
|
|
32
34
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
36
|
## [12.14.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.14.0...@quenty/scrollingframe@12.14.1) (2026-01-12)
|
|
39
37
|
|
|
40
|
-
|
|
41
38
|
### Bug Fixes
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
- Fix dependency installation process for pnpm ([9651b09](https://github.com/Quenty/NevermoreEngine/commit/9651b09af34f252ef3f9c7c539793cc878dd8cba))
|
|
48
41
|
|
|
49
42
|
# [12.14.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.13.1...@quenty/scrollingframe@12.14.0) (2026-01-11)
|
|
50
43
|
|
|
51
44
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
52
45
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
46
|
## [12.13.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.13.0...@quenty/scrollingframe@12.13.1) (2026-01-10)
|
|
58
47
|
|
|
59
48
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
60
49
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
50
|
# [12.13.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.12.4...@quenty/scrollingframe@12.13.0) (2026-01-04)
|
|
66
51
|
|
|
67
52
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
68
53
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
54
|
## [12.12.4](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.12.3...@quenty/scrollingframe@12.12.4) (2026-01-03)
|
|
74
55
|
|
|
75
56
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
76
57
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
58
|
## [12.12.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.12.2...@quenty/scrollingframe@12.12.3) (2025-12-29)
|
|
82
59
|
|
|
83
60
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
84
61
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
62
|
## [12.12.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.12.1...@quenty/scrollingframe@12.12.2) (2025-11-12)
|
|
90
63
|
|
|
91
64
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
92
65
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
66
|
## [12.12.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.12.0...@quenty/scrollingframe@12.12.1) (2025-08-12)
|
|
98
67
|
|
|
99
68
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
100
69
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
70
|
# [12.12.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.4...@quenty/scrollingframe@12.12.0) (2025-05-10)
|
|
106
71
|
|
|
107
|
-
|
|
108
72
|
### Features
|
|
109
73
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
74
|
+
- Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
|
|
115
75
|
|
|
116
76
|
## [12.11.4](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.3...@quenty/scrollingframe@12.11.4) (2025-04-10)
|
|
117
77
|
|
|
118
78
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
119
79
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
80
|
## [12.11.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.1...@quenty/scrollingframe@12.11.3) (2025-04-07)
|
|
125
81
|
|
|
126
|
-
|
|
127
82
|
### Bug Fixes
|
|
128
83
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
84
|
+
- Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
|
|
85
|
+
- Bump package versions for republishing ([ba47c62](https://github.com/Quenty/NevermoreEngine/commit/ba47c62e32170bf74377b0c658c60b84306dc294))
|
|
135
86
|
|
|
136
87
|
## [12.11.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.1...@quenty/scrollingframe@12.11.2) (2025-04-07)
|
|
137
88
|
|
|
138
|
-
|
|
139
89
|
### Bug Fixes
|
|
140
90
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
91
|
+
- Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
|
|
146
92
|
|
|
147
93
|
## [12.11.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.0...@quenty/scrollingframe@12.11.1) (2025-03-21)
|
|
148
94
|
|
|
149
95
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
150
96
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
97
|
# [12.11.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.10.0...@quenty/scrollingframe@12.11.0) (2025-02-18)
|
|
156
98
|
|
|
157
99
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
158
100
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
101
|
# [12.10.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.9.0...@quenty/scrollingframe@12.10.0) (2024-11-13)
|
|
164
102
|
|
|
165
103
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
166
104
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
105
|
# [12.9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.8.1...@quenty/scrollingframe@12.9.0) (2024-11-06)
|
|
172
106
|
|
|
173
107
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
174
108
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
109
|
## [12.8.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.8.0...@quenty/scrollingframe@12.8.1) (2024-11-04)
|
|
180
110
|
|
|
181
111
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
182
112
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
113
|
# [12.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.7.0...@quenty/scrollingframe@12.8.0) (2024-10-06)
|
|
188
114
|
|
|
189
115
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
190
116
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
117
|
# [12.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.6.0...@quenty/scrollingframe@12.7.0) (2024-10-04)
|
|
196
118
|
|
|
197
119
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
198
120
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
121
|
# [12.6.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.5.0...@quenty/scrollingframe@12.6.0) (2024-09-25)
|
|
204
122
|
|
|
205
123
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
206
124
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
125
|
# [12.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.4.1...@quenty/scrollingframe@12.5.0) (2024-09-25)
|
|
212
126
|
|
|
213
127
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
214
128
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
129
|
## [12.4.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.4.0...@quenty/scrollingframe@12.4.1) (2024-09-22)
|
|
220
130
|
|
|
221
131
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
222
132
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
133
|
# [12.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.3.0...@quenty/scrollingframe@12.4.0) (2024-09-12)
|
|
228
134
|
|
|
229
135
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
230
136
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
137
|
# [12.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.2.0...@quenty/scrollingframe@12.3.0) (2024-05-09)
|
|
236
138
|
|
|
237
|
-
|
|
238
139
|
### Bug Fixes
|
|
239
140
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
141
|
+
- Fix .package-lock.json replicating in packages ([75d0efe](https://github.com/Quenty/NevermoreEngine/commit/75d0efeef239f221d93352af71a5b3e930ec23c5))
|
|
245
142
|
|
|
246
143
|
# [12.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.1.1...@quenty/scrollingframe@12.2.0) (2024-04-27)
|
|
247
144
|
|
|
248
145
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
249
146
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
147
|
## [12.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.1.0...@quenty/scrollingframe@12.1.1) (2024-04-23)
|
|
255
148
|
|
|
256
149
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
257
150
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
151
|
# [12.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.0.0...@quenty/scrollingframe@12.1.0) (2024-03-09)
|
|
263
152
|
|
|
264
153
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
265
154
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
155
|
# [12.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@11.0.0...@quenty/scrollingframe@12.0.0) (2024-02-14)
|
|
271
156
|
|
|
272
157
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
273
158
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
159
|
# [11.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@10.0.0...@quenty/scrollingframe@11.0.0) (2024-02-13)
|
|
279
160
|
|
|
280
161
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
281
162
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
163
|
# [10.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@9.0.0...@quenty/scrollingframe@10.0.0) (2024-02-13)
|
|
287
164
|
|
|
288
165
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
289
166
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
167
|
# [9.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@8.2.0...@quenty/scrollingframe@9.0.0) (2024-01-10)
|
|
295
168
|
|
|
296
169
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
297
170
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
171
|
# [8.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@8.1.0...@quenty/scrollingframe@8.2.0) (2024-01-08)
|
|
303
172
|
|
|
304
173
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
305
174
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
175
|
# [8.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@8.0.0...@quenty/scrollingframe@8.1.0) (2023-12-14)
|
|
311
176
|
|
|
312
177
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
313
178
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
179
|
# [8.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.4.0...@quenty/scrollingframe@8.0.0) (2023-10-11)
|
|
319
180
|
|
|
320
181
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
321
182
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
183
|
# [7.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.3.0...@quenty/scrollingframe@7.4.0) (2023-08-23)
|
|
327
184
|
|
|
328
185
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
329
186
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
187
|
# [7.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.2.1...@quenty/scrollingframe@7.3.0) (2023-05-26)
|
|
335
188
|
|
|
336
189
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
337
190
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
191
|
## [7.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.2.0...@quenty/scrollingframe@7.2.1) (2023-04-07)
|
|
343
192
|
|
|
344
193
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
345
194
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
195
|
# [7.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.1.0...@quenty/scrollingframe@7.2.0) (2023-03-05)
|
|
351
196
|
|
|
352
197
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
353
198
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
199
|
# [7.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.0.1...@quenty/scrollingframe@7.1.0) (2023-02-21)
|
|
359
200
|
|
|
360
201
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
361
202
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
203
|
## [7.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@7.0.0...@quenty/scrollingframe@7.0.1) (2022-11-04)
|
|
367
204
|
|
|
368
205
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
369
206
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
207
|
# [7.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@6.3.0...@quenty/scrollingframe@7.0.0) (2022-09-27)
|
|
375
208
|
|
|
376
209
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
377
210
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
211
|
# [6.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@6.2.1...@quenty/scrollingframe@6.3.0) (2022-08-22)
|
|
383
212
|
|
|
384
213
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
385
214
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
215
|
## [6.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@6.2.0...@quenty/scrollingframe@6.2.1) (2022-08-16)
|
|
391
216
|
|
|
392
217
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
393
218
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
219
|
# [6.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@6.1.0...@quenty/scrollingframe@6.2.0) (2022-07-31)
|
|
399
220
|
|
|
400
221
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
401
222
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
223
|
# [6.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@6.0.0...@quenty/scrollingframe@6.1.0) (2022-06-21)
|
|
407
224
|
|
|
408
225
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
409
226
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
227
|
# [6.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@5.2.0...@quenty/scrollingframe@6.0.0) (2022-05-21)
|
|
415
228
|
|
|
416
229
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
417
230
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
231
|
# [5.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@5.1.0...@quenty/scrollingframe@5.2.0) (2022-03-27)
|
|
423
232
|
|
|
424
233
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
425
234
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
235
|
# [5.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@5.0.0...@quenty/scrollingframe@5.1.0) (2022-03-10)
|
|
431
236
|
|
|
432
237
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
433
238
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
239
|
# [5.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.3.0...@quenty/scrollingframe@5.0.0) (2022-03-06)
|
|
439
240
|
|
|
440
241
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
441
242
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
243
|
# [4.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.2.0...@quenty/scrollingframe@4.3.0) (2022-01-17)
|
|
447
244
|
|
|
448
245
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
449
246
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
247
|
# [4.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.1.1...@quenty/scrollingframe@4.2.0) (2022-01-07)
|
|
455
248
|
|
|
456
249
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
457
250
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
251
|
## [4.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.1.0...@quenty/scrollingframe@4.1.1) (2022-01-06)
|
|
463
252
|
|
|
464
253
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
465
254
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
255
|
# [4.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.0.2...@quenty/scrollingframe@4.1.0) (2022-01-03)
|
|
471
256
|
|
|
472
257
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
473
258
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
259
|
## [4.0.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.0.1...@quenty/scrollingframe@4.0.2) (2021-12-30)
|
|
479
260
|
|
|
480
261
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
481
262
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
263
|
## [4.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@4.0.0...@quenty/scrollingframe@4.0.1) (2021-12-30)
|
|
487
264
|
|
|
488
265
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
489
266
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
267
|
# [4.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.4.0...@quenty/scrollingframe@4.0.0) (2021-12-22)
|
|
495
268
|
|
|
496
269
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
497
270
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
271
|
# [3.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.3.0...@quenty/scrollingframe@3.4.0) (2021-12-18)
|
|
503
272
|
|
|
504
273
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
505
274
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
275
|
# [3.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.2.2...@quenty/scrollingframe@3.3.0) (2021-11-20)
|
|
511
276
|
|
|
512
|
-
|
|
513
277
|
### Bug Fixes
|
|
514
278
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
279
|
+
- Support MacOS syncing ([#225](https://github.com/Quenty/NevermoreEngine/issues/225)) ([03f9183](https://github.com/Quenty/NevermoreEngine/commit/03f918392c6a5bdd33f8a17c38de371d1e06c67a))
|
|
520
280
|
|
|
521
281
|
## [3.2.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.2.1...@quenty/scrollingframe@3.2.2) (2021-10-30)
|
|
522
282
|
|
|
523
283
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
524
284
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
285
|
## [3.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.2.0...@quenty/scrollingframe@3.2.1) (2021-10-06)
|
|
530
286
|
|
|
531
287
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
532
288
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
289
|
# [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.1.0...@quenty/scrollingframe@3.2.0) (2021-10-02)
|
|
538
290
|
|
|
539
291
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
540
292
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
293
|
# [3.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.0.1...@quenty/scrollingframe@3.1.0) (2021-09-22)
|
|
546
294
|
|
|
547
295
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
548
296
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
297
|
## [3.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@3.0.0...@quenty/scrollingframe@3.0.1) (2021-09-18)
|
|
554
298
|
|
|
555
299
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
556
300
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
301
|
# [3.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@2.1.0...@quenty/scrollingframe@3.0.0) (2021-09-11)
|
|
562
302
|
|
|
563
303
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
564
304
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
305
|
# [2.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@2.0.0...@quenty/scrollingframe@2.1.0) (2021-09-05)
|
|
570
306
|
|
|
571
307
|
**Note:** Version bump only for package @quenty/scrollingframe
|
|
572
308
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
309
|
# [2.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@1.2.0...@quenty/scrollingframe@2.0.0) (2021-09-05)
|
|
578
310
|
|
|
579
|
-
|
|
580
311
|
### Bug Fixes
|
|
581
312
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
313
|
+
- Remove peer dependencies. This is because lerna doesn't really support peer dependencies being linked and getting a new version on build, which is unfortunate. ([5f5aeee](https://github.com/Quenty/NevermoreEngine/commit/5f5aeeea8de9975435309e53679f0ef7064f9dd0))
|
|
587
314
|
|
|
588
315
|
# 1.2.0 (2021-07-31)
|
|
589
316
|
|
|
590
|
-
|
|
591
317
|
### Bug Fixes
|
|
592
318
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
319
|
+
- Add CI and CD ([47513e9](https://github.com/Quenty/NevermoreEngine/commit/47513e9b568162707534af132396dd8756947dd3))
|
|
320
|
+
- Adjust CI badge to show automatic build and release state ([5a55d3f](https://github.com/Quenty/NevermoreEngine/commit/5a55d3f19bf8d66a760d67da9b56ed47fab74656))
|
|
321
|
+
- Fix selene linting ([45fc074](https://github.com/Quenty/NevermoreEngine/commit/45fc07489ee59127ac6582689f19a0e87c1e5b5a))
|
|
598
322
|
|
|
599
323
|
## 1.0.2 (2021-07-25)
|
|
600
324
|
|
|
601
|
-
|
|
602
|
-
|
|
603
325
|
## 1.0.1 (2021-07-25)
|
|
604
326
|
|
|
605
|
-
|
|
606
|
-
|
|
607
327
|
# 1.0.0 (2021-07-24)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/scrollingframe",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.19.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",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@quenty/loader": "10.11.0",
|
|
32
32
|
"@quenty/maid": "3.9.0",
|
|
33
|
-
"@quenty/signal": "7.13.
|
|
33
|
+
"@quenty/signal": "7.13.1",
|
|
34
34
|
"@quenty/spring": "10.12.0",
|
|
35
35
|
"@quenty/table": "3.9.2"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "13f0162f4971a77378e55e9b7236aea94f0dd3a8"
|
|
41
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
Scrolling model for scrolling frame
|
|
4
4
|
@class ScrollModel
|
|
@@ -15,8 +15,37 @@ ScrollModel._min = 0
|
|
|
15
15
|
ScrollModel._max = 100
|
|
16
16
|
ScrollModel._viewSize = 50
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
export type ScrollModel = typeof(setmetatable(
|
|
19
|
+
{} :: {
|
|
20
|
+
_min: number,
|
|
21
|
+
_max: number,
|
|
22
|
+
_viewSize: number,
|
|
23
|
+
_spring: Spring.Spring<number>,
|
|
24
|
+
|
|
25
|
+
TotalContentLength: number,
|
|
26
|
+
ViewSize: number,
|
|
27
|
+
Max: number,
|
|
28
|
+
ContentMax: number,
|
|
29
|
+
Min: number,
|
|
30
|
+
ContentMin: number,
|
|
31
|
+
Position: number,
|
|
32
|
+
BackBounceInputRange: number,
|
|
33
|
+
BackBounceRenderRange: number,
|
|
34
|
+
ContentScrollPercentSize: number,
|
|
35
|
+
RenderedContentScrollPercentSize: number,
|
|
36
|
+
ContentScrollPercent: number,
|
|
37
|
+
RenderedContentScrollPercent: number,
|
|
38
|
+
BoundedRenderPosition: number,
|
|
39
|
+
Velocity: number,
|
|
40
|
+
Target: number,
|
|
41
|
+
TargetContentScrollPercent: number,
|
|
42
|
+
AtRest: boolean,
|
|
43
|
+
},
|
|
44
|
+
{} :: typeof({ __index = ScrollModel })
|
|
45
|
+
))
|
|
46
|
+
|
|
47
|
+
function ScrollModel.new(): ScrollModel
|
|
48
|
+
local self: ScrollModel = setmetatable({} :: any, ScrollModel)
|
|
20
49
|
|
|
21
50
|
self._spring = Spring.new(0)
|
|
22
51
|
self._spring.Speed = 20
|
|
@@ -24,11 +53,11 @@ function ScrollModel.new()
|
|
|
24
53
|
return self
|
|
25
54
|
end
|
|
26
55
|
|
|
27
|
-
function ScrollModel
|
|
56
|
+
function ScrollModel._getTimesOverBounds(self: ScrollModel, position: number): number
|
|
28
57
|
return self:GetDisplacementPastBounds(position) / self.BackBounceInputRange
|
|
29
58
|
end
|
|
30
59
|
|
|
31
|
-
function ScrollModel
|
|
60
|
+
function ScrollModel.GetDisplacementPastBounds(self: ScrollModel, position: number): number
|
|
32
61
|
if position > self.ContentMax then
|
|
33
62
|
return position - self.ContentMax
|
|
34
63
|
elseif position < self.ContentMin then
|
|
@@ -38,11 +67,13 @@ function ScrollModel:GetDisplacementPastBounds(position)
|
|
|
38
67
|
end
|
|
39
68
|
end
|
|
40
69
|
|
|
41
|
-
function ScrollModel
|
|
70
|
+
function ScrollModel.GetScale(_self: ScrollModel, timesOverBounds: number): number
|
|
42
71
|
return 1 - 0.5 ^ math.abs(timesOverBounds)
|
|
43
72
|
end
|
|
44
73
|
|
|
45
|
-
|
|
74
|
+
local rawScrollModel = ScrollModel :: any
|
|
75
|
+
|
|
76
|
+
rawScrollModel.__index = function(self: any, index: string): any
|
|
46
77
|
if index == "TotalContentLength" then
|
|
47
78
|
return self._max - self._min
|
|
48
79
|
elseif index == "ViewSize" then
|
|
@@ -100,15 +131,15 @@ function ScrollModel:__index(index)
|
|
|
100
131
|
return self._spring.Target
|
|
101
132
|
elseif index == "AtRest" then
|
|
102
133
|
return math.abs(self._spring.Target - self._spring.Position) < 1e-5 and math.abs(self._spring.Velocity) < 1e-5
|
|
103
|
-
elseif
|
|
104
|
-
return
|
|
134
|
+
elseif rawScrollModel[index] then
|
|
135
|
+
return rawScrollModel[index]
|
|
105
136
|
else
|
|
106
137
|
error(string.format("[ScrollModel] - '%s' is not a valid member", tostring(index)))
|
|
107
138
|
end
|
|
108
139
|
end
|
|
109
140
|
|
|
110
|
-
function
|
|
111
|
-
if
|
|
141
|
+
rawScrollModel.__newindex = function(self: any, index: string, value: any): ()
|
|
142
|
+
if rawScrollModel[index] or index == "_spring" then
|
|
112
143
|
rawset(self, index, value)
|
|
113
144
|
elseif index == "Min" or index == "ContentMin" then
|
|
114
145
|
self._min = value
|
package/src/Client/Scrollbar.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
@class Scrollbar
|
|
4
4
|
]=]
|
|
@@ -7,15 +7,41 @@ local require = require(script.Parent.loader).load(script)
|
|
|
7
7
|
|
|
8
8
|
local Maid = require("Maid")
|
|
9
9
|
local SCROLL_TYPE = require("SCROLL_TYPE")
|
|
10
|
+
local ScrollModel = require("ScrollModel")
|
|
10
11
|
local Signal = require("Signal")
|
|
11
12
|
local Table = require("Table")
|
|
12
13
|
|
|
14
|
+
type ScrollType = typeof(SCROLL_TYPE.Vertical)
|
|
15
|
+
|
|
16
|
+
-- ScrollingFrame is still nonstrict and exports no type; type the surface we use.
|
|
17
|
+
type ScrollingFrameLike = {
|
|
18
|
+
GetModel: (self: ScrollingFrameLike) -> ScrollModel.ScrollModel,
|
|
19
|
+
StartScrollbarScrolling: (
|
|
20
|
+
self: ScrollingFrameLike,
|
|
21
|
+
scrollbarContainer: Instance,
|
|
22
|
+
inputBeganObject: InputObject
|
|
23
|
+
) -> Maid.Maid,
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
local Scrollbar = {}
|
|
14
27
|
Scrollbar.ClassName = "Scrollbar"
|
|
15
28
|
Scrollbar.__index = Scrollbar
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
export type Scrollbar = typeof(setmetatable(
|
|
31
|
+
{} :: {
|
|
32
|
+
Gui: GuiObject,
|
|
33
|
+
DraggingBegan: Signal.Signal<()>,
|
|
34
|
+
_maid: Maid.Maid,
|
|
35
|
+
_container: Instance,
|
|
36
|
+
_scrollType: ScrollType,
|
|
37
|
+
_scrollingFrame: ScrollingFrameLike,
|
|
38
|
+
_model: ScrollModel.ScrollModel,
|
|
39
|
+
},
|
|
40
|
+
{} :: typeof({ __index = Scrollbar })
|
|
41
|
+
))
|
|
42
|
+
|
|
43
|
+
function Scrollbar.new(gui: GuiObject, scrollType: ScrollType?): Scrollbar
|
|
44
|
+
local self: Scrollbar = setmetatable({} :: any, Scrollbar)
|
|
19
45
|
|
|
20
46
|
self.Gui = gui or error("No gui")
|
|
21
47
|
self.DraggingBegan = Signal.new()
|
|
@@ -27,7 +53,7 @@ function Scrollbar.new(gui, scrollType)
|
|
|
27
53
|
return self
|
|
28
54
|
end
|
|
29
55
|
|
|
30
|
-
function Scrollbar.fromContainer(container, scrollType)
|
|
56
|
+
function Scrollbar.fromContainer(container: GuiObject, scrollType: ScrollType?): Scrollbar
|
|
31
57
|
local gui = Instance.new("ImageButton")
|
|
32
58
|
gui.Size = UDim2.fromScale(1, 1)
|
|
33
59
|
gui.Name = "ScrollBar"
|
|
@@ -42,12 +68,12 @@ function Scrollbar.fromContainer(container, scrollType)
|
|
|
42
68
|
return Scrollbar.new(gui, scrollType)
|
|
43
69
|
end
|
|
44
70
|
|
|
45
|
-
function Scrollbar
|
|
71
|
+
function Scrollbar.SetScrollType(self: Scrollbar, scrollType: ScrollType): ()
|
|
46
72
|
assert(Table.contains(SCROLL_TYPE, scrollType))
|
|
47
73
|
self._scrollType = scrollType
|
|
48
74
|
end
|
|
49
75
|
|
|
50
|
-
function Scrollbar
|
|
76
|
+
function Scrollbar.SetScrollingFrame(self: Scrollbar, scrollingFrame: ScrollingFrameLike): ()
|
|
51
77
|
self._scrollingFrame = scrollingFrame or error("No scrollingFrame")
|
|
52
78
|
self._model = self._scrollingFrame:GetModel()
|
|
53
79
|
|
|
@@ -60,7 +86,7 @@ function Scrollbar:SetScrollingFrame(scrollingFrame)
|
|
|
60
86
|
self:UpdateRender()
|
|
61
87
|
end
|
|
62
88
|
|
|
63
|
-
function Scrollbar
|
|
89
|
+
function Scrollbar.UpdateRender(self: Scrollbar): ()
|
|
64
90
|
if self._model.TotalContentLength > self._model.ViewSize then
|
|
65
91
|
local percentSize = self._model.RenderedContentScrollPercentSize
|
|
66
92
|
local pos = (1 - percentSize) * self._model.RenderedContentScrollPercent
|
|
@@ -81,10 +107,10 @@ function Scrollbar:UpdateRender()
|
|
|
81
107
|
end
|
|
82
108
|
end
|
|
83
109
|
|
|
84
|
-
function Scrollbar
|
|
85
|
-
self._maid:DoCleaning()
|
|
86
|
-
self._maid = nil
|
|
87
|
-
setmetatable(self, nil)
|
|
110
|
+
function Scrollbar.Destroy(self: Scrollbar): ()
|
|
111
|
+
self._maid:DoCleaning();
|
|
112
|
+
(self :: any)._maid = nil
|
|
113
|
+
setmetatable(self :: any, nil)
|
|
88
114
|
end
|
|
89
115
|
|
|
90
116
|
return Scrollbar
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
Creates an inertia based scrolling frame that is animated and has inertia frames
|
|
4
4
|
Alternative to a Roblox ScrollingFrame with inertia scrolling and complete control over behavior and style.
|
|
@@ -21,6 +21,26 @@ local ScrollingFrame = {}
|
|
|
21
21
|
ScrollingFrame.ClassName = "ScrollingFrame"
|
|
22
22
|
ScrollingFrame.__index = ScrollingFrame
|
|
23
23
|
|
|
24
|
+
export type ScrollType = {
|
|
25
|
+
Direction: string,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ScrollingFrameOptions = {
|
|
29
|
+
OnClick: ((inputObject: InputObject) -> ())?,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type ScrollingFrame = typeof(setmetatable(
|
|
33
|
+
{} :: {
|
|
34
|
+
_maid: Maid.Maid,
|
|
35
|
+
Gui: GuiObject,
|
|
36
|
+
_container: GuiObject,
|
|
37
|
+
_scrollType: ScrollType,
|
|
38
|
+
_scrollbars: { any },
|
|
39
|
+
_model: ScrollModel.ScrollModel,
|
|
40
|
+
},
|
|
41
|
+
{} :: typeof({ __index = ScrollingFrame })
|
|
42
|
+
))
|
|
43
|
+
|
|
24
44
|
--[=[
|
|
25
45
|
Creates a new ScrollingFrame which can be used. Prefer Container.Active = true so scroll wheel works.
|
|
26
46
|
Container should be in a Frame with ClipsDescendants = true
|
|
@@ -28,12 +48,12 @@ ScrollingFrame.__index = ScrollingFrame
|
|
|
28
48
|
@param gui BaseGui -- Gui to use
|
|
29
49
|
@return ScrollingFrame
|
|
30
50
|
]=]
|
|
31
|
-
function ScrollingFrame.new(gui)
|
|
32
|
-
local self = setmetatable({}, ScrollingFrame)
|
|
51
|
+
function ScrollingFrame.new(gui: GuiObject): ScrollingFrame
|
|
52
|
+
local self: ScrollingFrame = setmetatable({} :: any, ScrollingFrame)
|
|
33
53
|
|
|
34
54
|
self._maid = Maid.new()
|
|
35
55
|
self.Gui = gui or error("No Gui")
|
|
36
|
-
self._container = self.Gui.Parent or error("No container")
|
|
56
|
+
self._container = (self.Gui.Parent or error("No container")) :: GuiObject
|
|
37
57
|
self._scrollType = SCROLL_TYPE.Vertical
|
|
38
58
|
|
|
39
59
|
self._scrollbars = {}
|
|
@@ -59,12 +79,12 @@ function ScrollingFrame.new(gui)
|
|
|
59
79
|
end
|
|
60
80
|
|
|
61
81
|
-- Sets the scroll type for the frame
|
|
62
|
-
function ScrollingFrame
|
|
63
|
-
assert(Table.contains(SCROLL_TYPE, scrollType))
|
|
82
|
+
function ScrollingFrame.SetScrollType(self: ScrollingFrame, scrollType: ScrollType): ()
|
|
83
|
+
assert(Table.contains(SCROLL_TYPE :: any, scrollType))
|
|
64
84
|
self._scrollType = scrollType
|
|
65
85
|
end
|
|
66
86
|
|
|
67
|
-
function ScrollingFrame
|
|
87
|
+
function ScrollingFrame.AddScrollbar(self: ScrollingFrame, scrollbar: any): ()
|
|
68
88
|
assert(scrollbar, "Bad scrollbar")
|
|
69
89
|
scrollbar:SetScrollingFrame(self)
|
|
70
90
|
|
|
@@ -72,7 +92,7 @@ function ScrollingFrame:AddScrollbar(scrollbar)
|
|
|
72
92
|
self._maid[scrollbar] = scrollbar
|
|
73
93
|
end
|
|
74
94
|
|
|
75
|
-
function ScrollingFrame
|
|
95
|
+
function ScrollingFrame.RemoveScrollbar(self: ScrollingFrame, scrollbar: any): ()
|
|
76
96
|
local index = Table.getIndex(self._scrollbars, scrollbar)
|
|
77
97
|
if index then
|
|
78
98
|
table.remove(self._scrollbars, index)
|
|
@@ -81,34 +101,34 @@ function ScrollingFrame:RemoveScrollbar(scrollbar)
|
|
|
81
101
|
end
|
|
82
102
|
|
|
83
103
|
-- Scrolls to the position in pixels offset
|
|
84
|
-
function ScrollingFrame
|
|
104
|
+
function ScrollingFrame.ScrollTo(self: ScrollingFrame, position: number, doNotAnimate: boolean?): ()
|
|
85
105
|
self._model.Target = position
|
|
86
106
|
if doNotAnimate then
|
|
87
|
-
self._model.position = self._model.Target
|
|
107
|
+
(self._model :: any).position = self._model.Target
|
|
88
108
|
self._model.Velocity = 0
|
|
89
109
|
end
|
|
90
110
|
end
|
|
91
111
|
|
|
92
112
|
-- Scrolls to the top
|
|
93
|
-
function ScrollingFrame
|
|
113
|
+
function ScrollingFrame.ScrollToTop(self: ScrollingFrame, doNotAnimate: boolean?): ()
|
|
94
114
|
self:ScrollTo(self._model.Min, doNotAnimate)
|
|
95
115
|
end
|
|
96
116
|
|
|
97
117
|
-- Scrolls to the bottom
|
|
98
|
-
function ScrollingFrame
|
|
118
|
+
function ScrollingFrame.ScrollToBottom(self: ScrollingFrame, doNotAnimate: boolean?): ()
|
|
99
119
|
self:ScrollTo(self._model.Max, doNotAnimate)
|
|
100
120
|
end
|
|
101
121
|
|
|
102
|
-
function ScrollingFrame
|
|
122
|
+
function ScrollingFrame.GetModel(self: ScrollingFrame): ScrollModel.ScrollModel
|
|
103
123
|
return self._model
|
|
104
124
|
end
|
|
105
125
|
|
|
106
|
-
function ScrollingFrame
|
|
107
|
-
self._model.TotalContentLength = self.Gui.AbsoluteSize[self._scrollType.Direction]
|
|
108
|
-
self._model.ViewSize = self._container.AbsoluteSize[self._scrollType.Direction]
|
|
126
|
+
function ScrollingFrame._updateScrollerSize(self: ScrollingFrame): ()
|
|
127
|
+
self._model.TotalContentLength = (self.Gui.AbsoluteSize :: any)[self._scrollType.Direction]
|
|
128
|
+
self._model.ViewSize = (self._container.AbsoluteSize :: any)[self._scrollType.Direction]
|
|
109
129
|
end
|
|
110
130
|
|
|
111
|
-
function ScrollingFrame
|
|
131
|
+
function ScrollingFrame._updateRender(self: ScrollingFrame): ()
|
|
112
132
|
if self._scrollType == SCROLL_TYPE.Vertical then
|
|
113
133
|
self.Gui.Position = UDim2.new(self.Gui.Position.X, UDim.new(0, self._model.BoundedRenderPosition))
|
|
114
134
|
elseif self._scrollType == SCROLL_TYPE.Horizontal then
|
|
@@ -126,7 +146,7 @@ function ScrollingFrame:_updateRender()
|
|
|
126
146
|
end
|
|
127
147
|
end
|
|
128
148
|
|
|
129
|
-
function ScrollingFrame
|
|
149
|
+
function ScrollingFrame.StopDrag(self: ScrollingFrame): ()
|
|
130
150
|
local position = self._model.Position
|
|
131
151
|
|
|
132
152
|
if self._model:GetDisplacementPastBounds(position) == 0 then
|
|
@@ -141,7 +161,7 @@ function ScrollingFrame:StopDrag()
|
|
|
141
161
|
end
|
|
142
162
|
|
|
143
163
|
-- Scrolls until model is at rest
|
|
144
|
-
function ScrollingFrame
|
|
164
|
+
function ScrollingFrame._freeScroll(self: ScrollingFrame, lowPriority: boolean?): ()
|
|
145
165
|
if lowPriority and self._maid._updateMaid then
|
|
146
166
|
return
|
|
147
167
|
end
|
|
@@ -161,14 +181,14 @@ end
|
|
|
161
181
|
|
|
162
182
|
--
|
|
163
183
|
-- @param[opt=1] strength
|
|
164
|
-
function ScrollingFrame
|
|
165
|
-
|
|
184
|
+
function ScrollingFrame._getVelocityTracker(self: ScrollingFrame, strength: number?): () -> ()
|
|
185
|
+
local actualStrength = strength or 1
|
|
166
186
|
self._model.Velocity = 0
|
|
167
187
|
|
|
168
188
|
local lastUpdate = tick()
|
|
169
189
|
local lastPos = self._model.Position
|
|
170
190
|
|
|
171
|
-
return function()
|
|
191
|
+
return function(): ()
|
|
172
192
|
local pos = self._model.Position
|
|
173
193
|
local elapsed = tick() - lastUpdate
|
|
174
194
|
local delta = lastPos - pos
|
|
@@ -177,19 +197,19 @@ function ScrollingFrame:_getVelocityTracker(strength)
|
|
|
177
197
|
elapsed = 0.03
|
|
178
198
|
end
|
|
179
199
|
|
|
180
|
-
self._model.Velocity = self._model.Velocity - (delta / elapsed) *
|
|
200
|
+
self._model.Velocity = self._model.Velocity - (delta / elapsed) * actualStrength
|
|
181
201
|
lastPos = pos
|
|
182
202
|
lastUpdate = tick()
|
|
183
203
|
end
|
|
184
204
|
end
|
|
185
205
|
|
|
186
|
-
function ScrollingFrame
|
|
206
|
+
function ScrollingFrame._getInputProcessor(self: ScrollingFrame, inputBeganObject: InputObject): (InputObject) -> number
|
|
187
207
|
local startPos = self._model.Position
|
|
188
208
|
local updateVelocity = self:_getVelocityTracker()
|
|
189
209
|
local originalPos = inputBeganObject.Position
|
|
190
210
|
|
|
191
|
-
return function(inputObject: InputObject)
|
|
192
|
-
local distance = (inputObject.Position - originalPos)[self._scrollType.Direction]
|
|
211
|
+
return function(inputObject: InputObject): number
|
|
212
|
+
local distance = ((inputObject.Position - originalPos) :: any)[self._scrollType.Direction]
|
|
193
213
|
local pos = startPos - distance
|
|
194
214
|
self._model.Position = pos
|
|
195
215
|
self._model.Target = pos
|
|
@@ -203,7 +223,7 @@ end
|
|
|
203
223
|
|
|
204
224
|
-- Binds input to a specific GUI
|
|
205
225
|
-- @return maid Maid -- To cleanup inputs
|
|
206
|
-
function ScrollingFrame
|
|
226
|
+
function ScrollingFrame.BindInput(self: ScrollingFrame, gui: GuiObject, options: ScrollingFrameOptions?): Maid.Maid
|
|
207
227
|
local maid = Maid.new()
|
|
208
228
|
|
|
209
229
|
maid:GiveTask(gui.InputBegan:Connect(function(inputObject)
|
|
@@ -212,7 +232,7 @@ function ScrollingFrame:BindInput(gui, options)
|
|
|
212
232
|
|
|
213
233
|
maid:GiveTask(gui.InputChanged:Connect(function(inputObject)
|
|
214
234
|
if gui.Active and inputObject.UserInputType == Enum.UserInputType.MouseWheel then
|
|
215
|
-
self._model.Target = self._model.Target - inputObject.Position.z * 80
|
|
235
|
+
self._model.Target = self._model.Target - (inputObject.Position :: any).z * 80
|
|
216
236
|
self:_freeScroll()
|
|
217
237
|
end
|
|
218
238
|
end))
|
|
@@ -221,7 +241,11 @@ function ScrollingFrame:BindInput(gui, options)
|
|
|
221
241
|
return maid
|
|
222
242
|
end
|
|
223
243
|
|
|
224
|
-
function ScrollingFrame
|
|
244
|
+
function ScrollingFrame.StartScrolling(
|
|
245
|
+
self: ScrollingFrame,
|
|
246
|
+
inputBeganObject: InputObject,
|
|
247
|
+
options: ScrollingFrameOptions?
|
|
248
|
+
): ()
|
|
225
249
|
if inputBeganObject.UserInputState ~= Enum.UserInputState.Begin then
|
|
226
250
|
-- Touch events moving into GUIs occur sometimes
|
|
227
251
|
return
|
|
@@ -262,7 +286,7 @@ function ScrollingFrame:StartScrolling(inputBeganObject, options)
|
|
|
262
286
|
end
|
|
263
287
|
end)
|
|
264
288
|
|
|
265
|
-
maid:GiveTask(UserInputService.InputEnded:Connect(function(inputObject, _)
|
|
289
|
+
maid:GiveTask(UserInputService.InputEnded:Connect(function(inputObject: InputObject, _)
|
|
266
290
|
if inputObject == inputBeganObject then
|
|
267
291
|
self:StopDrag()
|
|
268
292
|
end
|
|
@@ -276,7 +300,11 @@ function ScrollingFrame:StartScrolling(inputBeganObject, options)
|
|
|
276
300
|
end
|
|
277
301
|
end
|
|
278
302
|
|
|
279
|
-
function ScrollingFrame
|
|
303
|
+
function ScrollingFrame.StartScrollbarScrolling(
|
|
304
|
+
self: ScrollingFrame,
|
|
305
|
+
scrollbarContainer: GuiObject,
|
|
306
|
+
inputBeganObject: InputObject
|
|
307
|
+
): Maid.Maid
|
|
280
308
|
assert(scrollbarContainer, "Bad scrollbarContainer")
|
|
281
309
|
assert(inputBeganObject, "Bad inputBeganObject")
|
|
282
310
|
|
|
@@ -286,12 +314,12 @@ function ScrollingFrame:StartScrollbarScrolling(scrollbarContainer, inputBeganOb
|
|
|
286
314
|
local startPercent = self._model.ContentScrollPercent
|
|
287
315
|
local updateVelocity = self:_getVelocityTracker(0.25)
|
|
288
316
|
|
|
289
|
-
maid:GiveTask(UserInputService.InputChanged:Connect(function(inputObject)
|
|
317
|
+
maid:GiveTask(UserInputService.InputChanged:Connect(function(inputObject: InputObject)
|
|
290
318
|
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
|
|
291
319
|
local direction = self._scrollType.Direction
|
|
292
|
-
local offset = (inputObject.Position - startPosition)[direction]
|
|
320
|
+
local offset = ((inputObject.Position - startPosition) :: any)[direction]
|
|
293
321
|
local percent = offset
|
|
294
|
-
/ (scrollbarContainer.AbsoluteSize[direction] * (1 - self._model.ContentScrollPercentSize))
|
|
322
|
+
/ ((scrollbarContainer.AbsoluteSize :: any)[direction] * (1 - self._model.ContentScrollPercentSize))
|
|
295
323
|
self._model.ContentScrollPercent = startPercent + percent
|
|
296
324
|
self._model.TargetContentScrollPercent = self._model.ContentScrollPercent
|
|
297
325
|
|
|
@@ -300,7 +328,7 @@ function ScrollingFrame:StartScrollbarScrolling(scrollbarContainer, inputBeganOb
|
|
|
300
328
|
end
|
|
301
329
|
end))
|
|
302
330
|
|
|
303
|
-
maid:GiveTask(UserInputService.InputEnded:Connect(function(inputObject)
|
|
331
|
+
maid:GiveTask(UserInputService.InputEnded:Connect(function(inputObject: InputObject)
|
|
304
332
|
if inputObject == inputBeganObject then
|
|
305
333
|
self:StopDrag()
|
|
306
334
|
end
|
|
@@ -311,10 +339,10 @@ function ScrollingFrame:StartScrollbarScrolling(scrollbarContainer, inputBeganOb
|
|
|
311
339
|
return maid
|
|
312
340
|
end
|
|
313
341
|
|
|
314
|
-
function ScrollingFrame
|
|
315
|
-
self._maid:DoCleaning()
|
|
316
|
-
self._maid = nil
|
|
317
|
-
setmetatable(self, nil)
|
|
342
|
+
function ScrollingFrame.Destroy(self: ScrollingFrame): ()
|
|
343
|
+
self._maid:DoCleaning();
|
|
344
|
+
(self :: any)._maid = nil
|
|
345
|
+
setmetatable(self :: any, nil)
|
|
318
346
|
end
|
|
319
347
|
|
|
320
348
|
return ScrollingFrame
|