@quenty/buttonhighlightmodel 14.2.0 → 14.2.1
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 +11 -0
- package/package.json +2 -2
- package/src/Client/ButtonHighlightModel.lua +27 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [14.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/buttonhighlightmodel@14.2.0...@quenty/buttonhighlightmodel@14.2.1) (2024-05-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add missing ObservePercentTarget methods ([530d059](https://github.com/Quenty/NevermoreEngine/commit/530d0590b20d4fb18c0c6258adaed31abff6e229))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [14.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/buttonhighlightmodel@14.1.1...@quenty/buttonhighlightmodel@14.2.0) (2024-04-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/buttonhighlightmodel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/buttonhighlightmodel",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.1",
|
|
4
4
|
"description": "Contains model information for the current button",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b79ff1d82eaa681d89be5f86331a1de40daf9fca"
|
|
42
42
|
}
|
|
@@ -228,6 +228,19 @@ function ButtonHighlightModel:ObservePercentPressed(acceleration)
|
|
|
228
228
|
}), acceleration or 200)
|
|
229
229
|
end
|
|
230
230
|
|
|
231
|
+
--[=[
|
|
232
|
+
Observes target for how pressed the button is
|
|
233
|
+
@return Observable<number>
|
|
234
|
+
]=]
|
|
235
|
+
function ButtonHighlightModel:ObservePercentPressedTarget()
|
|
236
|
+
return self._isPressed:Observe()
|
|
237
|
+
:Pipe({
|
|
238
|
+
Rx.map(function(value)
|
|
239
|
+
return value and 1 or 0
|
|
240
|
+
end);
|
|
241
|
+
})
|
|
242
|
+
end
|
|
243
|
+
|
|
231
244
|
--[=[
|
|
232
245
|
Returns true if highlighted
|
|
233
246
|
|
|
@@ -336,6 +349,19 @@ function ButtonHighlightModel:ObserveIsChoosen()
|
|
|
336
349
|
return self._isChoosen:Observe()
|
|
337
350
|
end
|
|
338
351
|
|
|
352
|
+
--[=[
|
|
353
|
+
Observes target for if the button is selected or not
|
|
354
|
+
@return Observable<number>
|
|
355
|
+
]=]
|
|
356
|
+
function ButtonHighlightModel:ObservePercentChoosenTarget()
|
|
357
|
+
return self._isChoosen:Observe()
|
|
358
|
+
:Pipe({
|
|
359
|
+
Rx.map(function(value)
|
|
360
|
+
return value and 1 or 0
|
|
361
|
+
end);
|
|
362
|
+
})
|
|
363
|
+
end
|
|
364
|
+
|
|
339
365
|
--[=[
|
|
340
366
|
Observes how choosen the button is
|
|
341
367
|
|
|
@@ -471,4 +497,4 @@ function ButtonHighlightModel:_setupLegacySteppedMode()
|
|
|
471
497
|
self:StartAnimation()
|
|
472
498
|
end
|
|
473
499
|
|
|
474
|
-
return ButtonHighlightModel
|
|
500
|
+
return ButtonHighlightModel
|