Skip to content

Commit

Permalink
v0.5.119
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Oct 20, 2024
1 parent 7826488 commit 5af5fb2
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 31 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.118
## Version: 0.5.119
## 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.118
## Version: 0.5.119
## 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.118
## Version: 0.5.119
## 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.118
## Version: 0.5.119
## 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.118
## Version: 0.5.119
## 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
60 changes: 36 additions & 24 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ function DarkMode:Event(event, ...)
["name"] = "DarkMode",
["icon"] = 136122,
["dbtab"] = DMTAB,
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.118"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.119"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["funcL"] = function()
DarkMode:ToggleSettings()
end,
Expand Down Expand Up @@ -1663,36 +1663,48 @@ function DarkMode:GroupLootUpdate()
end
end

function DarkMode:UpdateVigor()
for _, child in ipairs({UIWidgetPowerBarContainerFrame:GetChildren()}) do
if child.DecorLeft and child.DecorLeft.GetAtlas then
local atlas = child.DecorLeft:GetAtlas()
if atlas == "dragonriding_vigor_decor" then
DarkMode:UpdateColor(child.DecorLeft, "ui")
DarkMode:UpdateColor(child.DecorRight, "ui")
end
end

for _, cchild in ipairs({child:GetChildren()}) do
if cchild.Frame and cchild.Frame.GetAtlas then
local atlas = cchild.Frame:GetAtlas()
if atlas == "dragonriding_vigor_frame" then
DarkMode:UpdateColor(cchild.Frame, "ui")
end
end
end
end
end

local vigor = CreateFrame("Frame")
vigor:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED")
vigor:RegisterEvent("PLAYER_ENTERING_WORLD")
vigor:SetScript(
"OnEvent",
function(sel, event)
C_Timer.After(
0.02,
function()
local childs = {UIWidgetPowerBarContainerFrame:GetChildren()}
for _, child in pairs(childs) do
if child.DecorLeft and child.DecorLeft.GetAtlas then
local atlas = child.DecorLeft:GetAtlas()
if atlas == "dragonriding_vigor_decor" then
DarkMode:UpdateColor(child.DecorLeft, "ui")
DarkMode:UpdateColor(child.DecorRight, "ui")
end
end

for _, cchild in ipairs({child:GetChildren()}) do
if cchild.Frame and cchild.Frame.GetAtlas then
local atlas = cchild.Frame:GetAtlas()
if atlas == "dragonriding_vigor_frame" then
DarkMode:UpdateColor(cchild.Frame, "ui")
end
end
end
if event == "PLAYER_ENTERING_WORLD" then
C_Timer.After(
1,
function()
DarkMode:UpdateVigor()
end
end
)
)
elseif event == "PLAYER_MOUNT_DISPLAY_CHANGED" then
C_Timer.After(
0.1,
function()
DarkMode:UpdateVigor()
end
)
end
end
)

Expand Down
8 changes: 8 additions & 0 deletions libs/D4Lib/D4Realms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3106,6 +3106,10 @@ function D4:GetRealmLang(realmName)
return ""
end

if realmName == "" then
realmName = GetRealmName()
end

if realms[realmName] == nil then
if IsUkrainianLetters(realmName) then
return "ukUA"
Expand Down Expand Up @@ -3214,6 +3218,10 @@ realmLangs["대만"] = "chTW"
realmLangs["台灣"] = "chTW"
local missingRealmLangs = {}
function D4:GetRealmFlag(realmName)
if realmName == "" then
realmName = GetRealmName()
end

if not (GetLocale() == "enUS" or GetLocale() == "deDE" or GetLocale() == "koKR" or GetLocale() == "zhTW") then return "" end
local realmLang = D4:GetRealmLang(realmName)
if realmLang == nil then return "" end
Expand Down
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.118")
DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.5.118"))
DarkMode:SetVersion(AddonName, 136122, "0.5.119")
DMSettings.TitleText:SetText(format("DarkMode |T136122:16:16:0:0|t v|cff3FC7EB%s", "0.5.119"))
DMSettings.CloseButton:SetScript(
"OnClick",
function()
Expand Down

0 comments on commit 5af5fb2

Please sign in to comment.