Skip to content

Commit

Permalink
Added the option to use hotkey text as OOM indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Feb 1, 2018
1 parent 86e2deb commit ba7d0a8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
21 changes: 18 additions & 3 deletions config/bars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local flyout_dirs = {
RIGHT = L["RIGHT"],
}

local range_indicators = {
local button_indicators = {
button = L["ICON"],
hotkey = L["KEYBIND_TEXT"],
}
Expand Down Expand Up @@ -545,8 +545,8 @@ function CONFIG.CreateActionBarsPanel(_, order)
range_indicator = {
order = 12,
type = "select",
values = range_indicators,
name = L["OOR_INDICATOR"],
values = button_indicators,
disabled = function() return not BARS:IsInit() end,
get = function()
return C.db.profile.bars.range_indicator
Expand All @@ -557,8 +557,23 @@ function CONFIG.CreateActionBarsPanel(_, order)
BARS:UpdateBars("UpdateButtonConfig")
end,
},
desaturate_on_cd = {
mana_indicator = {
order = 13,
type = "select",
name = L["OOM_INDICATOR"],
values = button_indicators,
disabled = function() return not BARS:IsInit() end,
get = function()
return C.db.profile.bars.mana_indicator
end,
set = function(_, value)
C.db.profile.bars.mana_indicator = value
BARS:UpdateBars("UpdateConfig")
BARS:UpdateBars("UpdateButtonConfig")
end,
},
desaturate_on_cd = {
order = 14,
type = "toggle",
name = L["DESATURATE_ON_COOLDOWN"],
disabled = function() return not BARS:IsInit() end,
Expand Down
1 change: 1 addition & 0 deletions core/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2062,6 +2062,7 @@ D.profile = {
},
},
bars = {
mana_indicator = "button", -- hotkey
range_indicator = "button", -- hotkey
lock = true, -- watch: LOCK_ACTIONBAR
rightclick_selfcast = false,
Expand Down
2 changes: 1 addition & 1 deletion embeds/LibActionButton-1.0
1 change: 1 addition & 0 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ L["NPE_FRAME"] = "NPE Tutorial Frame"
L["NUM_BUTTONS"] = "Number of Buttons"
L["NUM_ROWS"] = "Number of Rows"
L["OBJECTIVE_TRACKER"] = "Objective Tracker"
L["OOM_INDICATOR"] = "Out-of-Mana Indicator"
L["OOR_INDICATOR"] = "Out-of-Range Indicator"
L["OPEN_CONFIG"] = "Open Config"
L["ORBS"] = "Orbs"
Expand Down
1 change: 1 addition & 0 deletions modules/bars/actionbars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ local function bar_UpdateButtonConfig(self)

self.buttonConfig.desaturateOnCooldown = C.db.profile.bars.desaturate_on_cd
self.buttonConfig.flyoutDirection = self._config.flyout_dir
self.buttonConfig.outOfManaColoring = C.db.profile.bars.mana_indicator
self.buttonConfig.outOfRangeColoring = C.db.profile.bars.range_indicator
self.buttonConfig.showGrid = self._config.grid

Expand Down

0 comments on commit ba7d0a8

Please sign in to comment.