-
-
Notifications
You must be signed in to change notification settings - Fork 92
huge bar fix #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ayro97
wants to merge
4
commits into
Zidras:main
Choose a base branch
from
Ayro97:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
huge bar fix #257
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -848,14 +848,25 @@ function barPrototype:SetVariance() | |
local varianceTex = _G[frame_name.."BarVariance"] | ||
local varianceTexBorder = _G[frame_name.."BarVarianceBorder"] | ||
if DBT.Options.VarianceEnabled and self.hasVariance then | ||
local varianceWidth = self.frame:GetWidth() * (self.varianceDuration / self.totalTime) | ||
local varianceWidth | ||
local isEnlarged = self.enlarged and not self.paused | ||
if isEnlarged and DBT.Options.BarStyle == "NoAnim" then | ||
local enlargeTime = DBT.Options.EnlargeBarTime or 11 | ||
varianceWidth = self.frame:GetWidth() * (self.varianceDuration / enlargeTime) | ||
else | ||
varianceWidth = self.frame:GetWidth() * (self.varianceDuration / self.totalTime) | ||
end | ||
|
||
if varianceWidth > self.frame:GetWidth() then | ||
varianceWidth = self.frame:GetWidth() | ||
end | ||
|
||
varianceTex:SetWidth(varianceWidth) | ||
|
||
-- change SetPoints based on fillUpBars | ||
local bar = _G[frame_name.."Bar"] | ||
varianceTex:ClearAllPoints() | ||
varianceTexBorder:ClearAllPoints() | ||
local isEnlarged = self.enlarged and not self.paused | ||
local fillUpBars = isEnlarged and DBT.Options.FillUpLargeBars or not isEnlarged and DBT.Options.FillUpBars | ||
|
||
if fillUpBars then | ||
|
@@ -975,14 +986,14 @@ function barPrototype:Update(elapsed) | |
return self:Cancel() | ||
else | ||
if fillUpBars then | ||
if currentStyle == "NoAnim" and timerValue <= enlargeTime and not enlargeHack and not self.varianceDuration then | ||
if currentStyle == "NoAnim" and timerValue <= enlargeTime and not enlargeHack then | ||
-- Simple/NoAnim Bar mimics BW in creating a new bar on large bar anchor instead of just moving the small bar | ||
bar:SetValue(1 - timerValue/(totaltimeValue < enlargeTime and totaltimeValue or enlargeTime)) | ||
else | ||
bar:SetValue(1 - timerValue/totaltimeValue) | ||
end | ||
else | ||
if currentStyle == "NoAnim" and timerValue <= enlargeTime and not enlargeHack and not self.varianceDuration then | ||
else | ||
if currentStyle == "NoAnim" and timerValue <= enlargeTime and not enlargeHack then | ||
-- Simple/NoAnim Bar mimics BW in creating a new bar on large bar anchor instead of just moving the small bar | ||
bar:SetValue(timerValue/(totaltimeValue < enlargeTime and totaltimeValue or enlargeTime)) | ||
else | ||
|
@@ -1073,7 +1084,7 @@ function barPrototype:Update(elapsed) | |
self:ApplyStyle() | ||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, this was intended. The bar starts enlarging at the lowest possible time, not the highest possible. |
||
self:RemoveFromList() | ||
self:Enlarge() | ||
end | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed by accident. Only wanted to remove some comments from myself