Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Jun 12, 2021
2 parents 4c4bbaf + 1d4f218 commit de5a949
Show file tree
Hide file tree
Showing 39 changed files with 789 additions and 173 deletions.
3 changes: 3 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ read_globals = {
"GetItemInfoInstant",
"GetMinimapZoneText",
"GetZonePVPInfo",
"InCombatLockdown",
"IsAddOnLoaded",
"LoadAddOn",
"RegisterUnitWatch",
"UnitClass",
"UnitClassification",
"UnitExists",
"UnitFactionGroup",
"UnitGUID",
"UnitHasVehicleUI",
Expand Down Expand Up @@ -106,6 +108,7 @@ read_globals = {
"PetCastingBarFrame",
"QueueStatusFrame",
"QueueStatusMinimapButton",
"SpellFlyout",
"TimeManagerClockButton",
"UIParent",

Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# CHANGELOG

## Version 90005.04

- Reworked fading. It's way more fluid and responsive now:
- Added fading to unit frames and the minimap;
- Added `Target` and `Combat` options. The former will make an element fade in when you target or
focus something, the latter will make an element fade in upon entering combat;
- Removed the `Fade In Delay` option.
- Split cooldown's `Expiration Threshold` into two options:
- `Expiration Threshold` now controls colouring;
- `S:MS Threshold` controls the format.
- Updated Simplified Chinese translation. Translated by aenerv7@Curse;
- Updated embeds.

KNOWN ISSUES:

Some people, predominantly with high refresh rate monitors, reported that after playing the game
for an extended period of time they noticed some FPS degradation. `/reload`-ing the UI resolves
the issue. I'm still investigating what's going on because neither people I know nor I have ever
experienced it personally which obviously makes testing and debugging a lot harder. However, I
think I know what might be causing it.
If you've experienced it, feel free to DM me on discord @ `ls-#9453`.

![Imgur](https://i.imgur.com/4hSxYOw.gif)

## Version 90005.03

- Fixed "Inventory" micro button's tooltip error.
Expand Down
16 changes: 15 additions & 1 deletion config/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ function CONFIG.CreateAurasPanel(_, order)
order = 10,
type = "range",
name = L["EXP_THRESHOLD"],
desc = L["EXP_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
},
m_ss_threshold = {
Expand All @@ -403,6 +402,21 @@ function CONFIG.CreateAurasPanel(_, order)
end
end,
},
s_ms_threshold = {
order = 12,
type = "range",
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
set = function(info, value)
if C.db.profile.auras.cooldown[info[#info]] ~= value then
C.db.profile.auras.cooldown[info[#info]] = value

AURAS:UpdateHeaders("UpdateConfig")
AURAS:UpdateHeaders("UpdateCooldownConfig")
end
end,
},
},
},
spacer_2 = {
Expand Down
21 changes: 19 additions & 2 deletions config/auratracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ function CONFIG.CreateAuraTrackerPanel(_, order)
order = 11,
type = "range",
name = L["EXP_THRESHOLD"],
desc = L["EXP_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
get = function()
return C.db.char.auratracker.cooldown.exp_threshold
Expand Down Expand Up @@ -356,9 +355,27 @@ function CONFIG.CreateAuraTrackerPanel(_, order)
end
end,
},
size = {
s_ms_threshold = {
order = 13,
type = "range",
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
get = function()
return C.db.char.auratracker.cooldown.s_ms_threshold
end,
set = function(_, value)
if C.db.char.auratracker.cooldown.s_ms_threshold ~= value then
C.db.char.auratracker.cooldown.s_ms_threshold = value

AURATRACKER:GetTracker():UpdateConfig()
AURATRACKER:GetTracker():UpdateCooldownConfig()
end
end,
},
size = {
order = 14,
type = "range",
name = L["SIZE"],
min = 8, max = 48, step = 1,
},
Expand Down
65 changes: 52 additions & 13 deletions config/bars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ local function getOptionsTable_Fading(order, barID)
type = "group",
name = L["FADING"],
inline = true,
disabled = function()
return not C.db.profile.bars[barID].fade.enabled
end,
get = function(info)
return C.db.profile.bars[barID].fade[info[#info]]
end,
Expand All @@ -209,39 +212,61 @@ local function getOptionsTable_Fading(order, barID)
order = 1,
type = "toggle",
name = L["ENABLE"],
disabled = false,
},
in_delay = {
reset = {
order = 2,
type = "range",
name = L["FADE_IN_DELAY"],
min = 0, max = 1, step = 0.05,
type = "execute",
name = L["RESTORE_DEFAULTS"],
disabled = false,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars[barID].fade, C.db.profile.bars[barID].fade, {enabled = true})
BARS:GetBar(barID):UpdateConfig()
BARS:GetBar(barID):UpdateFading()
end,
},
in_duration = {
spacer_1 = {
order = 3,
type = "description",
name = " ",
},
combat = {
order = 4,
type = "toggle",
name = L["COMBAT"],
},
target = {
order = 5,
type = "toggle",
name = L["TARGET"],
},
in_duration = {
order = 6,
type = "range",
name = L["FADE_IN_DURATION"],
min = 0.05, max = 1, step = 0.05,
},
out_delay = {
order = 4,
order = 7,
type = "range",
name = L["FADE_OUT_DELAY"],
min = 0, max = 2, step = 0.05,
},
out_duration = {
order = 5,
order = 8,
type = "range",
name = L["FADE_OUT_DURATION"],
min = 0.05, max = 1, step = 0.05,
},
min_alpha = {
order = 6,
order = 9,
type = "range",
name = L["MIN_ALPHA"],
min = 0, max = 1, step = 0.05,
},
max_alpha = {
order = 7,
order = 10,
type = "range",
name = L["MAX_ALPHA"],
min = 0, max = 1, step = 0.05
Expand All @@ -250,9 +275,9 @@ local function getOptionsTable_Fading(order, barID)
}

if barID == "bar1" then
temp.disabled = isModuleDisabledOrRestricted
temp.hidden = isModuleDisabledOrRestricted
elseif barID == "pet_battle" then
temp.disabled = isPetBattleBarDisabledOrRestricted
temp.hidden = isPetBattleBarDisabledOrRestricted
elseif barID == "micromenu" then
temp.set = function(info, value)
C.db.profile.bars[barID].fade[info[#info]] = value
Expand All @@ -262,7 +287,7 @@ local function getOptionsTable_Fading(order, barID)
BARS:GetBar("micromenu2"):UpdateFading()
end
elseif barID == "xpbar" then
temp.disabled = isXPBarDisabledOrRestricted
temp.hidden = isXPBarDisabledOrRestricted
end

return temp
Expand Down Expand Up @@ -861,7 +886,6 @@ function CONFIG.CreateActionBarsPanel(_, order)
order = 10,
type = "range",
name = L["EXP_THRESHOLD"],
desc = L["EXP_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
},
m_ss_threshold = {
Expand All @@ -883,6 +907,21 @@ function CONFIG.CreateActionBarsPanel(_, order)
end
end,
},
s_ms_threshold = {
order = 12,
type = "range",
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
set = function(info, value)
if C.db.profile.bars.cooldown[info[#info]] ~= value then
C.db.profile.bars.cooldown[info[#info]] = value

BARS:UpdateBars("UpdateConfig")
BARS:UpdateBars("UpdateCooldownConfig")
end
end,
},
},
},
action_bar_1 = getOptionsTable_Bar("bar1", 50, L["BAR_1"]),
Expand Down
2 changes: 1 addition & 1 deletion config/general/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ function CONFIG:CreateGeneralPanel(order)
MAELSTROM = {
order = 24,
type = "color",
name = L["MAELSTROM"],
name = L["MAELSTROM_POWER"],
},
INSANITY = {
order = 25,
Expand Down
99 changes: 98 additions & 1 deletion config/minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ local function isMinimapRound()
return MINIMAP:IsInit() and not MINIMAP:IsSquare()
end

local function isFadingDisabled()
return not (MINIMAP:IsInit() and C.db.profile.minimap.fade.enabled)
end

local function isButtonCollectionDisabled()
return not (MINIMAP:IsInit() and C.db.profile.minimap.collect.enabled)
end
Expand Down Expand Up @@ -299,9 +303,102 @@ function CONFIG.CreateMinimapPanel(_, order)
type = "description",
name = " ",
},
collect = {
fadeing = {
order = 60,
type = "group",
name = L["FADING"],
inline = true,
get = function(info)
return C.db.profile.minimap.fade[info[#info]]
end,
set = function(info, value)
C.db.profile.minimap.fade[info[#info]] = value

Minimap:UpdateConfig()
Minimap:UpdateFading()
end,
args = {
enabled = {
order = 1,
type = "toggle",
name = L["ENABLE"],
disabled = isModuleDisabled,
},
reset = {
order = 2,
type = "execute",
name = L["RESTORE_DEFAULTS"],
disabled = isFadingDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.minimap.fade, C.db.profile.minimap.fade, {enabled = true})

Minimap:UpdateConfig()
Minimap:UpdateFading()
end,
},
spacer_1 = {
order = 3,
type = "description",
name = " ",
},
combat = {
order = 4,
type = "toggle",
name = L["COMBAT"],
disabled = isFadingDisabled,
},
target = {
order = 5,
type = "toggle",
name = L["TARGET"],
disabled = isFadingDisabled,
},
in_duration = {
order = 6,
type = "range",
name = L["FADE_IN_DURATION"],
disabled = isFadingDisabled,
min = 0.05, max = 1, step = 0.05,
},
out_delay = {
order = 7,
type = "range",
name = L["FADE_OUT_DELAY"],
disabled = isFadingDisabled,
min = 0, max = 2, step = 0.05,
},
out_duration = {
order = 8,
type = "range",
name = L["FADE_OUT_DURATION"],
disabled = isFadingDisabled,
min = 0.05, max = 1, step = 0.05,
},
min_alpha = {
order = 9,
type = "range",
name = L["MIN_ALPHA"],
disabled = isFadingDisabled,
min = 0, max = 1, step = 0.05,
},
max_alpha = {
order = 10,
type = "range",
name = L["MAX_ALPHA"],
disabled = isFadingDisabled,
min = 0, max = 1, step = 0.05
},
},
},
spacer_7 = {
order = 69,
type = "description",
name = " ",
},
collect = {
order = 70,
type = "group",
name = L["COLLECT_BUTTONS"],
inline = true,
get = function(info)
Expand Down
1 change: 1 addition & 0 deletions config/unitframes/_unitframes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Script file="auras.lua"/>
<Script file="castbar.lua"/>
<Script file="customtexts.lua"/>
<Script file="fading.lua"/>
<Script file="health.lua"/>
<Script file="misc.lua"/>
<Script file="name.lua"/>
Expand Down
Loading

0 comments on commit de5a949

Please sign in to comment.