Skip to content

Commit

Permalink
v0.5.112
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Sep 25, 2024
1 parent 13954de commit 4e45f49
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 14 deletions.
4 changes: 2 additions & 2 deletions DarkMode.toc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Interface-Classic: 11503
## Interface-Classic: 11504
## Interface-BCC: 20504
## Interface-Wrath: 30403
## Interface-Cata: 40400
## Interface: 110002

## Version: 0.5.111
## Version: 0.5.112
## 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.111
## Version: 0.5.112
## 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.111
## Version: 0.5.112
## 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 DarkMode_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 11503
## Version: 0.5.111
## Interface: 11504
## Version: 0.5.112
## 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.111
## Version: 0.5.112
## 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 core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ function DarkMode:Event(event, ...)
["name"] = "DarkMode",
["icon"] = 136122,
["dbtab"] = DMTAB,
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.111"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["vTT"] = {{"DarkMode |T136122:16:16:0:0|t", "v|cff3FC7EB0.5.112"}, {DarkMode:Trans("LEFTCLICK"), DarkMode:Trans("MMBTNLEFT")}, {DarkMode:Trans("RIGHTCLICK"), DarkMode:Trans("MMBTNRIGHT")}},
["funcL"] = function()
DarkMode:ToggleSettings()
end,
Expand Down
25 changes: 23 additions & 2 deletions libs/D4Lib/D4Frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,30 @@ function D4:CreateSlider(tab)
tab.steps = tab.steps or 1
tab.decimals = tab.decimals or 0
tab.key = tab.key or tab.name or ""
local slider = CreateFrame("Slider", tab.key, tab.parent, "OptionsSliderTemplate")
slider:SetWidth(tab.sw)
local slider = CreateFrame("Slider", tab.key, tab.parent, "UISliderTemplate")
slider:SetSize(tab.sw, 16)
slider:SetPoint(unpack(tab.pTab))
if slider.Low == nil then
slider.Low = slider:CreateFontString(nil, nil, "GameFontNormal")
slider.Low:SetPoint("BOTTOMLEFT", slider, "BOTTOMLEFT", 0, -12)
slider.Low:SetFont(STANDARD_TEXT_FONT, 10, "THINOUTLINE")
slider.Low:SetTextColor(1, 1, 1)
end

if slider.High == nil then
slider.High = slider:CreateFontString(nil, nil, "GameFontNormal")
slider.High:SetPoint("BOTTOMRIGHT", slider, "BOTTOMRIGHT", 0, -12)
slider.High:SetFont(STANDARD_TEXT_FONT, 10, "THINOUTLINE")
slider.High:SetTextColor(1, 1, 1)
end

if slider.Text == nil then
slider.Text = slider:CreateFontString(nil, nil, "GameFontNormal")
slider.Text:SetPoint("TOP", slider, "TOP", 0, 16)
slider.Text:SetFont(STANDARD_TEXT_FONT, 12, "THINOUTLINE")
slider.Text:SetTextColor(1, 1, 1)
end

slider.Low:SetText(tab.vmin)
slider.High:SetText(tab.vmax)
local struct = D4:Trans(tab.key)
Expand Down
29 changes: 25 additions & 4 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,30 @@ end

local function AddSlider(x, key, val, func, vmin, vmax, steps, keys)
if sls[key] == nil then
sls[key] = CreateFrame("Slider", "sls[" .. key .. "]", DMSettings.SC, "OptionsSliderTemplate")
sls[key]:SetWidth(DMSettings.SC:GetWidth() - 30 - x)
sls[key] = CreateFrame("Slider", "sls[" .. key .. "]", DMSettings.SC, "UISliderTemplate")
sls[key]:SetSize(DMSettings.SC:GetWidth() - 30 - x, 16)
sls[key]:SetPoint("TOPLEFT", DMSettings.SC, "TOPLEFT", x + 5, posy)
if sls[key].Low == nil then
sls[key].Low = sls[key]:CreateFontString(nil, nil, "GameFontNormal")
sls[key].Low:SetPoint("BOTTOMLEFT", sls[key], "BOTTOMLEFT", 0, -12)
sls[key].Low:SetFont(STANDARD_TEXT_FONT, 10, "THINOUTLINE")
sls[key].Low:SetTextColor(1, 1, 1)
end

if sls[key].High == nil then
sls[key].High = sls[key]:CreateFontString(nil, nil, "GameFontNormal")
sls[key].High:SetPoint("BOTTOMRIGHT", sls[key], "BOTTOMRIGHT", 0, -12)
sls[key].High:SetFont(STANDARD_TEXT_FONT, 10, "THINOUTLINE")
sls[key].High:SetTextColor(1, 1, 1)
end

if sls[key].Text == nil then
sls[key].Text = sls[key]:CreateFontString(nil, nil, "GameFontNormal")
sls[key].Text:SetPoint("TOP", sls[key], "TOP", 0, 16)
sls[key].Text:SetFont(STANDARD_TEXT_FONT, 12, "THINOUTLINE")
sls[key].Text:SetTextColor(1, 1, 1)
end

sls[key].key = key
sls[key].SetText = function(self, text)
if sls[key].Text then
Expand Down Expand Up @@ -351,8 +372,8 @@ function DarkMode:InitDMSettings()
DMSettings:Hide()
end

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

0 comments on commit 4e45f49

Please sign in to comment.