Conversation
remove whitespace
Zidras
left a comment
There was a problem hiding this comment.
I have reviewed the PR purely on submitted code, I haven't tested anything, so I might not be grasping your intentions.
In any case, it seems there are extra code unrelated to the initial bug report. Not only that, some even seem wrong.
DBM-StatusBarTimers/DBT.lua
Outdated
There was a problem hiding this comment.
This is wrong indentation. Revert to what it was before, with 1 line break in between functions
DBM-StatusBarTimers/DBT.lua
Outdated
There was a problem hiding this comment.
This call is inside SetTimer. I don't understand the need for this code nor what it tries to fix
DBM-StatusBarTimers/DBT.lua
Outdated
There was a problem hiding this comment.
What is this new element you're introducing .elapsed ? I don't see it being used anywhere
|
|
||
| function barPrototype:SetColor(color) | ||
| -- Fix to allow colors not require the table keys | ||
| if color[1] and not color.r then |
DBM-StatusBarTimers/DBT.lua
Outdated
There was a problem hiding this comment.
You cached DBT.Options but only used it once.
| end | ||
|
|
||
| -- change SetPoints based on fillUpBars | ||
| varianceTex:SetWidth(varianceWidth) |
There was a problem hiding this comment.
Removed by accident. Only wanted to remove some comments from myself
DBM-StatusBarTimers/DBT.lua
Outdated
DBM-StatusBarTimers/DBT.lua
Outdated
| DBT:UpdateBars(true) | ||
| end | ||
| if not paused and ((barOptions.VarianceEnabled and timerLowestValueFromVariance or timerValue) <= enlargeTime) and not self.small and not isEnlarged and isMoving ~= "enlarge" and enlargeEnabled then | ||
| if not paused and timerValue <= enlargeTime and not self.small and not isEnlarged and isMoving ~= "enlarge" and enlargeEnabled then |
There was a problem hiding this comment.
IIRC, this was intended. The bar starts enlarging at the lowest possible time, not the highest possible.
|
@Ayro97 I've noticed a bug with your implementation, when Fill Up is disabled, where the bar does not enlarge at the defined time. |
fix for #252
3 key changes:
1. Correcting When the Bar Becomes Huge
The Problem: Bars with variance were becoming huge too early. The code was checking the displayed text (time until variance starts) against the enlargeTime, not the bar's actual timer.
The Solution: Change the enlargement condition in
barPrototype:Updateto always use the bar's actual timer(timerValue).2. Correcting the Huge Bar's Fill Level
The Problem: The huge bar's visual fullness was still a percentage of its original total duration, making it look half-empty when it should have been starting a new countdown.
The Solution: In
barPrototype:Update, for huge "NoAnim" bars, changed the denominator in thebar:SetValue()calculation from the originaltotaltimeValuetoenlargeTime.3. Correcting the Huge Bar's Variance Overlay
The Problem: The shaded variance overlay was too small on huge bars because its width was also being calculated as a percentage of the original, longer duration.
The Solution: Modified the
barPrototype:SetVariancefunction. Added a check to see if the bar was huge and using the "NoAnim" style. If so, change the denominator for the overlay's width calculation fromself.totalTimetoenlargeTime.