Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Sep 28, 2018
2 parents d58fe71 + 43e90dd commit 5cc33fc
Show file tree
Hide file tree
Showing 43 changed files with 1,030 additions and 293 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# CHANGELOG

## Version 80000.11

- Added options to adjust auras' count text and aura type icon. It's also possible to display
actual debuff types instead of generic down arrows;
- Added options to adjust xp bar's text's format and visiblity;
- Added options to adjust castbars' colours;
- Added a hack for cooldown numbers. Cooldown spirals are still bugged, but that's a Blizz bug;
- Updated minimap button handling. This should greatly improve compatibility w/ addons that add
various markers, for instance, TomTom, ZygorGuides;
- Updated embeds.

## Version 80000.10

- Added cooldown options to the "Unit Frames" and unit frames' "Auras" configs;
Expand Down
Binary file added assets/unit-frame-aura-icons.TGA
Binary file not shown.
94 changes: 82 additions & 12 deletions config/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ local SEP_TYPES = {
[1] = L["YOURS_FIRST"],
}

local POINTS = {
["BOTTOM"] = "BOTTOM",
["BOTTOMLEFT"] = "BOTTOMLEFT",
["BOTTOMRIGHT"] = "BOTTOMRIGHT",
["CENTER"] = "CENTER",
["LEFT"] = "LEFT",
["RIGHT"] = "RIGHT",
["TOP"] = "TOP",
["TOPLEFT"] = "TOPLEFT",
["TOPRIGHT"] = "TOPRIGHT",
}

local function isModuleDisabled()
return not AURAS:IsInit()
end
Expand All @@ -67,7 +79,7 @@ local function getOptionsTable_Aura(order, name, filter)
set = function(info, value)
if C.db.profile.auras[filter][info[#info]] ~= value then
C.db.profile.auras[filter][info[#info]] = value
AURAS:GetHeader(filter):Update()
AURAS:ForHeader(filter, "Update")
end
end,
args = {
Expand All @@ -77,7 +89,7 @@ local function getOptionsTable_Aura(order, name, filter)
name = L["RESTORE_DEFAULTS"],
func = function()
CONFIG:CopySettings(D.profile.auras[filter], C.db.profile.auras[filter], {point = true})
AURAS:GetHeader(filter):Update()
AURAS:ForHeader(filter, "Update")
end,
},
spacer_1 = {
Expand Down Expand Up @@ -119,7 +131,7 @@ local function getOptionsTable_Aura(order, name, filter)
end,
set = function(_, value)
C.db.profile.auras[filter].x_growth, C.db.profile.auras[filter].y_growth = s_split("_", value)
AURAS:GetHeader(filter):Update()
AURAS:ForHeader(filter, "Update")
end,
},
sort_method = {
Expand All @@ -145,9 +157,49 @@ local function getOptionsTable_Aura(order, name, filter)
type = "description",
name = " ",
},
count = {
type = {
order = 20,
type = "group",
name = "Aura Type",
inline = true,
get = function(info)
return C.db.profile.auras[filter].type[info[#info]]
end,
set = function(info, value)
if C.db.profile.auras[filter].type[info[#info]] ~= value then
C.db.profile.auras[filter].type[info[#info]] = value
AURAS:ForHeader(filter, "UpdateConfig")
AURAS:ForHeader(filter, "ForEachButton", "UpdateAuraTypeIcon")
end
end,
args = {
debuff_type = {
order = 1,
type = "toggle",
name = "Debuff Type",
},
size = {
order = 2,
type = "range",
name = L["SIZE"],
min = 10, max = 32, step = 2,
},
position = {
order = 3,
type = "select",
name = L["POINT"],
values = POINTS,
},
},
},
spacer_3 = {
order = 29,
type = "description",
name = " ",
},
count = {
order = 30,
type = "group",
name = L["COUNT_TEXT"],
inline = true,
get = function(info)
Expand All @@ -156,8 +208,8 @@ local function getOptionsTable_Aura(order, name, filter)
set = function(info, value)
if C.db.profile.auras[filter].count[info[#info]] ~= value then
C.db.profile.auras[filter].count[info[#info]] = value
AURAS:GetHeader(filter):UpdateConfig()
AURAS:GetHeader(filter):UpdateButtons("UpdateCountFont")
AURAS:ForHeader(filter, "UpdateConfig")
AURAS:ForHeader(filter, "ForEachButton", "UpdateCountText")
end
end,
args = {
Expand All @@ -173,15 +225,27 @@ local function getOptionsTable_Aura(order, name, filter)
name = L["FLAG"],
values = FLAGS,
},
h_alignment = {
order = 3,
type = "select",
name = L["TEXT_HORIZ_ALIGNMENT"],
values = H_ALIGNMENTS,
},
v_alignment = {
order = 4,
type = "select",
name = L["TEXT_VERT_ALIGNMENT"],
values = V_ALIGNMENTS,
},
},
},
spacer_3 = {
order = 29,
spacer_4 = {
order = 39,
type = "description",
name = " ",
},
cooldown = {
order = 30,
order = 40,
type = "group",
name = L["COOLDOWN_TEXT"],
inline = true,
Expand All @@ -191,8 +255,8 @@ local function getOptionsTable_Aura(order, name, filter)
set = function(info, value)
if C.db.profile.auras[filter].cooldown.text[info[#info]] ~= value then
C.db.profile.auras[filter].cooldown.text[info[#info]] = value
AURAS:GetHeader(filter):UpdateConfig()
AURAS:GetHeader(filter):UpdateCooldownConfig()
AURAS:ForHeader(filter, "UpdateConfig")
AURAS:ForHeader(filter, "UpdateCooldownConfig")
end
end,
args = {
Expand Down Expand Up @@ -236,13 +300,19 @@ local function getOptionsTable_Aura(order, name, filter)
temp.args.sort_dir = nil
temp.args.sort_method = nil
temp.args.count = nil
temp.args.type = nil
temp.args.spacer_3 = nil
temp.args.spacer_4 = nil

temp.args.num = {
order = 10,
type = "range",
name = L["NUM_BUTTONS"],
min = 1, max = 4, step = 1,
}
elseif filter == "HELPFUL" then
temp.args.type = nil
temp.args.spacer_3 = nil
end

return temp
Expand Down Expand Up @@ -283,7 +353,7 @@ function CONFIG.CreateAurasPanel(_, order)
disabled = isModuleDisabled,
func = function()
CONFIG:CopySettings(D.profile.auras, C.db.profile.auras, {point = true})
AURAS:UpdateHeaders("Update")
AURAS:ForEachHeader("Update")
end,
},
spacer_1 = {
Expand Down
63 changes: 56 additions & 7 deletions config/bars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ local FLAGS = {
["_Shadow"] = L["SHADOW"],
}

local FORMATS = {
["NUM"] = L["NUMERIC"],
["NUM_PERC"] = L["NUMERIC_PERCENTAGE"]
}

local VISIBILITY = {
[1] = L["ALWAYS_SHOW"],
[2] = L["MOUSEOVER_SHOW"],
}

local MICRO_BARS = {
["micromenu1"] = L["MAIN_BAR"],
["micromenu2"] = L["ADDITIONAL_BAR"],
Expand Down Expand Up @@ -1546,12 +1556,6 @@ function CONFIG.CreateActionBarsPanel(_, order)
get = function(info)
return C.db.profile.bars.xpbar[info[#info]]
end,
set = function(info, value)
if C.db.profile.bars.xpbar[info[#info]] ~= value then
C.db.profile.bars.xpbar[info[#info]] = value
BARS:GetBar("xpbar"):Update()
end
end,
args = {
enabled = {
order = 1,
Expand Down Expand Up @@ -1598,13 +1602,27 @@ function CONFIG.CreateActionBarsPanel(_, order)
name = L["WIDTH"],
min = 530, max = 1900, step = 2,
disabled = isXPBarDisabledOrRestricted,
set = function(info, value)
if C.db.profile.bars.xpbar[info[#info]] ~= value then
C.db.profile.bars.xpbar[info[#info]] = value
BARS:GetBar("xpbar"):UpdateConfig()
BARS:GetBar("xpbar"):UpdateSize(value, C.db.profile.bars.xpbar.height)
end
end,
},
height = {
order = 11,
type = "range",
name = L["HEIGHT"],
min = 8, max = 32, step = 4,
disabled = isXPBarDisabledOrRestricted,
set = function(info, value)
if C.db.profile.bars.xpbar[info[#info]] ~= value then
C.db.profile.bars.xpbar[info[#info]] = value
BARS:GetBar("xpbar"):UpdateConfig()
BARS:GetBar("xpbar"):UpdateSize(C.db.profile.bars.xpbar.width, value)
end
end,
},
spacer_2 = {
order = 19,
Expand All @@ -1624,7 +1642,11 @@ function CONFIG.CreateActionBarsPanel(_, order)
if C.db.profile.bars.xpbar.text[info[#info]] ~= value then
C.db.profile.bars.xpbar.text[info[#info]] = value
BARS:GetBar("xpbar"):UpdateConfig()
BARS:GetBar("xpbar"):UpdateFont()
BARS:GetBar("xpbar"):ForEach(
"UpdateFont",
C.db.profile.bars.xpbar.text.size,
C.db.profile.bars.xpbar.text.flag)
BARS:GetBar("xpbar"):ForEach("UpdateText")
end
end,
args = {
Expand All @@ -1640,6 +1662,33 @@ function CONFIG.CreateActionBarsPanel(_, order)
name = L["FLAG"],
values = FLAGS,
},
format = {
order = 3,
type = "select",
name = L["FORMAT"],
values = FORMATS,
set = function(info, value)
if C.db.profile.bars.xpbar.text[info[#info]] ~= value then
C.db.profile.bars.xpbar.text[info[#info]] = value
BARS:GetBar("xpbar"):UpdateConfig()
BARS:GetBar("xpbar"):UpdateTextFormat(value)
BARS:GetBar("xpbar"):ForEach("UpdateText")
end
end,
},
visibility = {
order = 4,
type = "select",
name = L["VISIBILITY"],
values = VISIBILITY,
set = function(info, value)
if C.db.profile.bars.xpbar.text[info[#info]] ~= value then
C.db.profile.bars.xpbar.text[info[#info]] = value
BARS:GetBar("xpbar"):UpdateConfig()
BARS:GetBar("xpbar"):ForEach("LockText", value == 1)
end
end,
},
},
},
spacer_3 = {
Expand Down
60 changes: 60 additions & 0 deletions config/blizzard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local CONFIG = P:GetModule("Config")

-- Lua
local _G = getfenv(0)
local unpack = _G.unpack

-- Mine
local DRAG_KEYS = {
Expand Down Expand Up @@ -375,6 +376,65 @@ function CONFIG.CreateBlizzardPanel(_, order)
},
},
},
spacer_4 = {
order = 39,
type = "description",
name = " ",
},
colors = {
order = 40,
type = "group",
name = L["COLORS"],
inline = true,
get = function(info)
return unpack(C.db.profile.blizzard.castbar.colors[info[#info]])
end,
set = function(info, r, g, b)
if r ~= nil then
local color = C.db.profile.blizzard.castbar.colors[info[#info]]
if color[1] ~= r or color[2] ~= g or color[3] ~= b then
color[1], color[2], color[3] = r, g, b
BLIZZARD:UpdateCastBars()
end
end
end,
args = {
reset = {
type = "execute",
order = 1,
name = L["RESTORE_DEFAULTS"],
func = function()
CONFIG:CopySettings(D.profile.blizzard.castbar.colors, C.db.profile.blizzard.castbar.colors)
BLIZZARD:UpdateCastBars()
end,
},
spacer_1 = {
order = 9,
type = "description",
name = " ",
},
casting = {
order = 10,
type = "color",
name = L["SPELL_CAST"],
},
channeling = {
order = 11,
type = "color",
name = L["SPELL_CHANNELED"],
},
failed = {
order = 12,
type = "color",
name = L["SPELL_FAILED"],
},
notinterruptible = {
order = 13,
type = "color",
name = L["SPELL_UNINTERRUPTIBLE"],
},
},
},
},
},
digsite_bar = {
Expand Down
Loading

0 comments on commit 5cc33fc

Please sign in to comment.