Skip to content

Commit

Permalink
v0.5.115
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Oct 8, 2024
1 parent 1d41a73 commit 02338c8
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DarkMode.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Interface-Cata: 40400
## Interface: 110002

## Version: 0.5.114
## Version: 0.5.115
## Title: DarkMode by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_Cata.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 40400
## Version: 0.5.114
## Version: 0.5.115
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_TBC.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 20504
## Version: 0.5.114
## Version: 0.5.115
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 11504
## Version: 0.5.114
## Version: 0.5.115
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion DarkMode_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 30403
## Version: 0.5.114
## Version: 0.5.115
## Title: DarkMode |T136122:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
4 changes: 2 additions & 2 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ function DarkMode:SearchUi(from)
function()
DarkMode:Debug(5, "#6")
for i, btn in pairs(_G) do
if (strfind(i, "LibDBIcon10_", 1, true) or strfind(i, "D4Lib_MMBTN_", 1, true)) and not strfind(i, "DMBorder", 1, true) then
if (strfind(i, "LibDBIcon10_", 1, true) or strfind(i, "MinimapButton_D4Lib_", 1, true)) and not strfind(i, "DMBorder", 1, true) then
local name = btn:GetName()
if btn and _G[name .. "DMBorder"] == nil and DarkMode:IsEnabled("MASKMINIMAPBUTTONS", true) and (btn.border == nil or btn.border == true) then
local border = btn:CreateTexture(name .. "DMBorder", "OVERLAY")
Expand Down Expand Up @@ -1618,7 +1618,7 @@ function DarkMode:Event(event, ...)
["name"] = "DarkMode",
["icon"] = 136122,
["dbtab"] = DMTAB,
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.114"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.115"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["funcL"] = function()
DarkMode:ToggleSettings()
end,
Expand Down
18 changes: 14 additions & 4 deletions libs/D4Lib/D4MinimapButtons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ function D4:CreateMinimapButton(params)
end

params.dbtab[params.name] = params.dbtab[params.name] or {}
_G["D4Lib_MMBTN_" .. params.name] = CreateFrame("Button", "D4Lib_MMBTN_" .. params.name, Minimap)
local btn = _G["D4Lib_MMBTN_" .. params.name]
_G["MinimapButton_D4Lib_" .. params.name] = CreateFrame("Button", "MinimapButton_D4Lib_" .. params.name, Minimap)
local btn = _G["MinimapButton_D4Lib_" .. params.name]
btn.border = params.border
btn.db = params.dbtab
btn.db.minimapPos = btn.db.minimapPos or 0
Expand Down Expand Up @@ -241,7 +241,12 @@ function D4:ShowMMBtn(name)
return
end

D4:GetMMBtn("D4Lib_MMBTN_" .. name):Show()
local btn = D4:GetMMBtn("MinimapButton_D4Lib_" .. name)
if btn then
btn:Show()
else
D4:MSG("[ShowMMBtn] Missing Button", name)
end
end

function D4:HideMMBtn(name)
Expand All @@ -251,5 +256,10 @@ function D4:HideMMBtn(name)
return
end

D4:GetMMBtn("D4Lib_MMBTN_" .. name):Hide()
local btn = D4:GetMMBtn("MinimapButton_D4Lib_" .. name)
if btn then
btn:Hide()
else
D4:MSG("[HideMMBtn] Missing Button", name)
end
end
4 changes: 2 additions & 2 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ function DarkMode:InitDMSettings()
DMSettings:Hide()
end

DarkMode:SetVersion(AddonName, 136122, "0.5.114")
DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.5.114"))
DarkMode:SetVersion(AddonName, 136122, "0.5.115")
DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.5.115"))
DMSettings.CloseButton:SetScript(
"OnClick",
function()
Expand Down

0 comments on commit 02338c8

Please sign in to comment.