mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 08:12:39 +00:00
Added "instant" feature to bars
This commit is contained in:
parent
f67e18b4bf
commit
d015d0177c
3 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
- Releasing a held buyable/clickable with onHold doesn't click it again.
|
||||
- Fixed hard resetting while NaN'ed and exporting NaN saves for debugging.
|
||||
- Attempt to fix buttons sometimes not updating.
|
||||
- Added "instant" feature for bars. (not useful for most people)
|
||||
- Improvements to theme code, partially by Cubedey.
|
||||
|
||||
## v2.6.0.1 - 6/4/21
|
||||
|
|
|
@ -35,3 +35,6 @@ Features:
|
|||
- layer: **assigned automagically**. It's the same value as the name of this layer, so you can do `player[this.layer].points` or similar.
|
||||
|
||||
- id: **assigned automagically**. It's the "key" which the bar was stored under, for convenient access. The bar in the example's id is "bigBar".
|
||||
|
||||
|
||||
- instant: **very optional**. If this is true, the bar will instantly snap to the current value instead of animating in between. Good for things involving precise timing.
|
|
@ -116,6 +116,10 @@ function constructBarStyle(layer, id) {
|
|||
case DEFAULT:
|
||||
style.fillDims['clip-path'] = 'inset(0% 50% 0% 0%)'
|
||||
}
|
||||
|
||||
if (bar.instant) {
|
||||
style.fillDims['transition-duration'] = '0s'
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue