@quenty/buttonhighlightmodel 7.8.0 → 7.9.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,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
+ # [7.9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/buttonhighlightmodel@7.8.0...@quenty/buttonhighlightmodel@7.9.0) (2023-02-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * Pass in acceleration as desired to ButtonHighlightModel ([f1b5970](https://github.com/Quenty/NevermoreEngine/commit/f1b5970c19a396b68611b33b8a95e121800147ba))
12
+
13
+
14
+
15
+
16
+
6
17
  # [7.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/buttonhighlightmodel@7.7.0...@quenty/buttonhighlightmodel@7.8.0) (2023-01-11)
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": "7.8.0",
3
+ "version": "7.9.0",
4
4
  "description": "Contains model information for the current button",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,15 +27,15 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@quenty/acceltween": "^2.2.1",
30
- "@quenty/baseobject": "^6.0.1",
31
- "@quenty/blend": "^6.7.0",
32
- "@quenty/loader": "^6.0.1",
30
+ "@quenty/baseobject": "^6.1.0",
31
+ "@quenty/blend": "^6.8.0",
32
+ "@quenty/loader": "^6.1.0",
33
33
  "@quenty/maid": "^2.4.0",
34
- "@quenty/rx": "^7.4.0",
34
+ "@quenty/rx": "^7.5.0",
35
35
  "@quenty/steputils": "^3.2.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "db2db00ab4e24a3eab0449b77a00bee6d91f2755"
40
+ "gitHead": "e084b0cc097ddbcb7c782b8ecbd9c2d619c49354"
41
41
  }
@@ -243,23 +243,27 @@ end
243
243
 
244
244
  --[=[
245
245
  Observes how pressed down the button is
246
+
247
+ @param acceleration number | nil
246
248
  @return Observable<number>
247
249
  ]=]
248
- function ButtonHighlightModel:ObservePercentPressed()
250
+ function ButtonHighlightModel:ObservePercentPressed(acceleration)
249
251
  return Blend.AccelTween(Blend.toPropertyObservable(self.IsPressed)
250
252
  :Pipe({
251
253
  Rx.map(function(value)
252
254
  return value and 1 or 0
253
255
  end);
254
- }), 200)
256
+ }), acceleration or 200)
255
257
  end
256
258
 
257
259
  --[=[
258
260
  Observes how highlighted the button is
261
+
262
+ @param acceleration number | nil
259
263
  @return Observable<number>
260
264
  ]=]
261
- function ButtonHighlightModel:ObservePercentHighlighted()
262
- return Blend.AccelTween(self:ObservePercentHighlightedTarget(), 200)
265
+ function ButtonHighlightModel:ObservePercentHighlighted(acceleration)
266
+ return Blend.AccelTween(self:ObservePercentHighlightedTarget(), acceleration or 200)
263
267
  end
264
268
 
265
269
  --[=[
@@ -277,15 +281,17 @@ end
277
281
 
278
282
  --[=[
279
283
  Observes how choosen the button is
284
+
285
+ @param acceleration number | nil
280
286
  @return Observable<number>
281
287
  ]=]
282
- function ButtonHighlightModel:ObservePercentChoosen()
288
+ function ButtonHighlightModel:ObservePercentChoosen(acceleration)
283
289
  return Blend.AccelTween(Blend.toPropertyObservable(self.IsChoosen)
284
290
  :Pipe({
285
291
  Rx.map(function(value)
286
292
  return value and 1 or 0
287
293
  end);
288
- }), 200)
294
+ }), acceleration or 200)
289
295
  end
290
296
 
291
297
  --[=[
@@ -353,8 +359,7 @@ end
353
359
  function ButtonHighlightModel:_updateTargets()
354
360
  self.IsMouseOrTouchOver.Value = self._isMouseOver.Value or self._numFingerDown.Value > 0
355
361
  self.IsPressed.Value = (self._isMouseDown.Value or self._isKeyDown.Value or self._numFingerDown.Value > 0)
356
- self.IsHighlighted.Value = self.IsChoosen.Value
357
- or self.IsSelected.Value
362
+ self.IsHighlighted.Value = self.IsSelected.Value
358
363
  or self._numFingerDown.Value > 0
359
364
  or self._isKeyDown.Value
360
365
  or self._isMouseOver.Value