1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Added "instant" feature to bars

This commit is contained in:
Harley White 2021-06-07 19:25:19 -04:00
parent f67e18b4bf
commit d015d0177c
3 changed files with 8 additions and 0 deletions

View file

@ -7,6 +7,7 @@
- Releasing a held buyable/clickable with onHold doesn't click it again. - Releasing a held buyable/clickable with onHold doesn't click it again.
- Fixed hard resetting while NaN'ed and exporting NaN saves for debugging. - Fixed hard resetting while NaN'ed and exporting NaN saves for debugging.
- Attempt to fix buttons sometimes not updating. - Attempt to fix buttons sometimes not updating.
- Added "instant" feature for bars. (not useful for most people)
- Improvements to theme code, partially by Cubedey. - Improvements to theme code, partially by Cubedey.
## v2.6.0.1 - 6/4/21 ## v2.6.0.1 - 6/4/21

View file

@ -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. - 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". - 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.

View file

@ -116,6 +116,10 @@ function constructBarStyle(layer, id) {
case DEFAULT: case DEFAULT:
style.fillDims['clip-path'] = 'inset(0% 50% 0% 0%)' style.fillDims['clip-path'] = 'inset(0% 50% 0% 0%)'
} }
if (bar.instant) {
style.fillDims['transition-duration'] = '0s'
}
return style return style
} }