Skip to content

Commit

Permalink
progress bar segments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Feb 18, 2024
1 parent 1906cea commit 6923545
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions Dominos_Progress/localization/localization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ L.Width = 'Width'
L.Height = 'Height'
L.AlwaysShowText = 'Always Show Text'
L.Segmented = 'Segmented'
L.SegmentCount = 'Segement Count'
L.Font = 'Font'
L.AutoSwitchModes = 'Auto Switch Modes'
L.Display_label = 'Show Labels'
Expand Down
17 changes: 10 additions & 7 deletions Dominos_Progress/progressBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -710,17 +710,20 @@ do

local l = LibStub('AceLocale-3.0'):GetLocale('Dominos-Progress')

panel.segmentedCheckbox = panel:NewCheckButton{
name = l.Segmented,
panel.segmentCount = panel:NewSlider{
name = l.SegmentCount,

min = 1,

max = 100,

get = function()
return panel.owner:GetSegmentCount() > 1
return panel.owner:GetSegmentCount()
end,

set = function(_, enable)
local segmentCount = enable and 20 or 1
panel.owner:SetSegmentCount(segmentCount)
end
set = function(_, value)
panel.owner:SetSegmentCount(value)
end,
}

panel.widthSlider = panel:NewSlider{
Expand Down
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## 10.2.20

* Added the ability to toggle bindings, macros, counts, and equipped item border visibility on a per bar basis
* Added per bar toggles for bindings, macros, counts, and equipped item border visibility
* Added the ability to configure the number of segments on progress bars

## 10.2.19

Expand Down

0 comments on commit 6923545

Please sign in to comment.