@quenty/buttonhighlightmodel 9.1.1 → 9.2.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 +12 -0
- package/package.json +7 -7
- package/src/Client/ButtonHighlightModel.lua +16 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
# [9.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/buttonhighlightmodel@9.1.1...@quenty/buttonhighlightmodel@9.2.0) (2023-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Handle button higlight model cleaningup during event emission ([e8263f8](https://github.com/Quenty/NevermoreEngine/commit/e8263f8efee344e120708b14caf7cbe429cf7493))
|
|
12
|
+
* Handle edge case where we'd clean up while fingers are still down ([71ef8f7](https://github.com/Quenty/NevermoreEngine/commit/71ef8f7d4313909b06876f67411a13efd5c22f3b))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [9.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/buttonhighlightmodel@9.1.0...@quenty/buttonhighlightmodel@9.1.1) (2023-10-28)
|
|
7
19
|
|
|
8
20
|
**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": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "Contains model information for the current button",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@quenty/acceltween": "^2.3.0",
|
|
30
|
-
"@quenty/baseobject": "^7.
|
|
31
|
-
"@quenty/blend": "^7.
|
|
32
|
-
"@quenty/loader": "^7.
|
|
30
|
+
"@quenty/baseobject": "^7.1.0",
|
|
31
|
+
"@quenty/blend": "^7.2.0",
|
|
32
|
+
"@quenty/loader": "^7.1.0",
|
|
33
33
|
"@quenty/maid": "^2.6.0",
|
|
34
|
-
"@quenty/rx": "^8.
|
|
34
|
+
"@quenty/rx": "^8.2.0",
|
|
35
35
|
"@quenty/steputils": "^3.3.0",
|
|
36
|
-
"@quenty/valueobject": "^8.
|
|
36
|
+
"@quenty/valueobject": "^8.2.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2c2dbbc0cb2fbb46b4f3270c559c63890fe18b26"
|
|
42
42
|
}
|
|
@@ -396,7 +396,9 @@ function ButtonHighlightModel:_trackTouch(inputObject)
|
|
|
396
396
|
|
|
397
397
|
self._numFingerDown.Value = self._numFingerDown.Value + 1
|
|
398
398
|
maid:GiveTask(function()
|
|
399
|
-
|
|
399
|
+
if self._numFingerDown.Destroy then
|
|
400
|
+
self._numFingerDown.Value = self._numFingerDown.Value - 1
|
|
401
|
+
end
|
|
400
402
|
end)
|
|
401
403
|
maid:GiveTask(inputObject:GetPropertyChangedSignal("UserInputState"):Connect(function()
|
|
402
404
|
if inputObject.UserInputState == Enum.UserInputState.End then
|
|
@@ -414,12 +416,19 @@ end
|
|
|
414
416
|
|
|
415
417
|
function ButtonHighlightModel:_updateTargets()
|
|
416
418
|
self._isMouseOrTouchOver.Value = self._isMouseOver.Value or self._numFingerDown.Value > 0
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
or self._isKeyDown.Value
|
|
421
|
-
|
|
422
|
-
|
|
419
|
+
|
|
420
|
+
-- Assume event emission can lead to cleanup in middle of call
|
|
421
|
+
if self._isPressed.Destroy then
|
|
422
|
+
self._isPressed.Value = (self._isMouseDown.Value or self._isKeyDown.Value or self._numFingerDown.Value > 0)
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if self._isHighlighted.Destroy then
|
|
426
|
+
self._isHighlighted.Value = self._isSelected.Value
|
|
427
|
+
or self._numFingerDown.Value > 0
|
|
428
|
+
or self._isKeyDown.Value
|
|
429
|
+
or self._isMouseOver.Value
|
|
430
|
+
or self._isMouseDown.Value
|
|
431
|
+
end
|
|
423
432
|
end
|
|
424
433
|
|
|
425
434
|
function ButtonHighlightModel:_update()
|