Skip to content

Commit

Permalink
v0.5.103
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Sep 4, 2024
1 parent 257c185 commit affa782
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 27 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.102
## Version: 0.5.103
## 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.102
## Version: 0.5.103
## 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.102
## Version: 0.5.103
## 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: 11503
## Version: 0.5.102
## Version: 0.5.103
## 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.102
## Version: 0.5.103
## 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
41 changes: 23 additions & 18 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,35 @@ end

local addonsDelay = 0
local addonsRetry = false
function DarkMode:AddonsSearch()
function DarkMode:RetryAddonsSearch()
if addonsRetry and GetTime() > addonsDelay then
DarkMode:AddonsSearch("RETRY")
end

C_Timer.After(
0.1,
function()
DarkMode:RetryAddonsSearch()
end
)
end

DarkMode:RetryAddonsSearch()
function DarkMode:AddonsSearch(from)
if GetTime() < addonsDelay then
addonsRetry = true
addonsDelay = GetTime() + 1
addonsDelay = GetTime() + 0.11

return
end

addonsDelay = GetTime() + 1
addonsDelay = GetTime() + 0.11
addonsRetry = false
C_Timer.After(
0.07,
0.09,
function()
DarkMode:Debug(5, "#17")
DarkMode:SearchAddons()
DarkMode:SearchAddons(from)
if PlayerTalentFrame then
for i, v in pairs({"PlayerSpecTab1", "PlayerSpecTab2", "PlayerSpecTab3", "PlayerSpecTab4"}) do
local tab = _G[v]
Expand Down Expand Up @@ -58,16 +72,6 @@ function DarkMode:AddonsSearch()

ClassTalentFrame:UpdateColors()
end

C_Timer.After(
1,
function()
if addonsRetry then
addonsRetry = false
DarkMode:AddonsSearch()
end
end
)
end
)
end
Expand Down Expand Up @@ -666,7 +670,7 @@ end

local foundAuctionator = false
local foundExpansion = false
function DarkMode:SearchAddons()
function DarkMode:SearchAddons(from)
if AuctionatorAHTabsContainer ~= nil and AuctionatorAHTabsContainer.Tabs ~= nil and foundAuctionator == false then
foundAuctionator = true
for i, v in pairs(AuctionatorAHTabsContainer.Tabs) do
Expand Down Expand Up @@ -1602,7 +1606,7 @@ function DarkMode:Event(event, ...)
["name"] = "DarkMode",
["icon"] = 136122,
["dbtab"] = DMTAB,
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.102"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.103"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["funcL"] = function()
DarkMode:ToggleSettings()
end,
Expand All @@ -1623,7 +1627,8 @@ function DarkMode:Event(event, ...)
end
end
elseif event == "ADDON_LOADED" then
DarkMode:AddonsSearch()
local from = ...
DarkMode:AddonsSearch(from)
elseif event == "START_LOOT_ROLL" then
C_Timer.After(
0.1,
Expand Down
4 changes: 2 additions & 2 deletions data.lua

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ function DarkMode:InitDMSettings()
DMSettings:Hide()
end

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

0 comments on commit affa782

Please sign in to comment.