Skip to content

Commit

Permalink
v0.5.45
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Jun 15, 2024
1 parent cbb08f5 commit fff11e7
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 15 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: 100207, 110000

## Version: 0.5.44
## Version: 0.5.45
## 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.44
## Version: 0.5.45
## 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.44
## Version: 0.5.45
## 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: 11502
## Version: 0.5.44
## Version: 0.5.45
## 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.44
## Version: 0.5.45
## 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
15 changes: 13 additions & 2 deletions libs/D4Lib/D4Frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ function D4:CreateSlider(tab)
slider:SetPoint(unpack(tab.pTab))
slider.Low:SetText(tab.vmin)
slider.High:SetText(tab.vmax)
slider.Text:SetText(format(D4:Trans(tab.key), tab.value))
local struct = D4:Trans(tab.key)
if struct then
slider.Text:SetText(string.format(struct, tab.value))
else
print("[D4] missing format string:", tab.key)
end

slider:SetMinMaxValues(tab.vmin, tab.vmax)
slider:SetObeyStepOnDrag(true)
slider:SetValueStep(tab.steps)
Expand All @@ -114,7 +120,12 @@ function D4:CreateSlider(tab)
tab:func()
end

slider.Text:SetText(format(D4:Trans(tab.key), val))
local struct2 = D4:Trans(tab.key)
if struct2 then
slider.Text:SetText(string.format(struct2, val))
else
print("[D4] Missing format string:", tab.key)
end
end
)

Expand Down
2 changes: 1 addition & 1 deletion libs/D4Lib/D4Output.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ function D4:msg(...)
end

function D4:MSG(name, icon, ...)
print(format("[|cFFA0A0FF%s|r |T%s:0:0:0:0|t]", name, icon), ...)
print(string.format("[|cFFA0A0FF%s|r |T%s:0:0:0:0|t]", name, icon), ...)
end
6 changes: 3 additions & 3 deletions libs/D4Lib/D4Translations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ function D4:Trans(key, lang, t1, t2, t3)
end

if t1 and t2 and t3 then
result = format(result, t1, t2, t3)
result = string.format(result, t1, t2, t3)
end

if t1 and t2 then
result = format(result, t1, t2)
result = string.format(result, t1, t2)
end

if t1 then
result = format(result, t1)
result = string.format(result, t1)
end

return result or key
Expand Down
4 changes: 2 additions & 2 deletions libs/D4Lib/D4Versions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function D4:CheckVersion(name, ver)
local higher = D4:IsHigherVersion(ov1, ov2, ov3, cv1, cv2, cv3)
if higher and name and D4.VersionTab and D4.VersionTab[string.lower(name)] then
D4.VersionTab[string.lower(name)].foundHigher = true
D4:MSG(name, D4.VersionTab[string.lower(name)].icon, format("New Version available (v%s -> v%s)", D4:GetVersion(name), ver))
D4:MSG(name, D4.VersionTab[string.lower(name)].icon, string.format("New Version available (v%s -> v%s)", D4:GetVersion(name), ver))
end
end

Expand All @@ -122,7 +122,7 @@ f:SetScript(
end

if isInitialLogin and ver and pre and C_ChatInfo then
C_ChatInfo.SendAddonMessage(pre, format("A;%s;V;%s", AddonName, ver))
C_ChatInfo.SendAddonMessage(pre, string.format("A;%s;V;%s", AddonName, ver))
end
end
)
Expand Down
4 changes: 2 additions & 2 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ function DarkMode:InitDMSettings()
DMSettings:Hide()
end

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

0 comments on commit fff11e7

Please sign in to comment.