Skip to content

Commit

Permalink
v0.9.103
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Sep 28, 2024
1 parent 5df1fe2 commit 0d25b37
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ImproveAny.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Interface-Cata: 40400
## Interface: 110002

## Version: 0.9.102
## Version: 0.9.103
## Title: ImproveAny by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Improve Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion ImproveAny_Cata.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 40400
## Version: 0.9.102
## Version: 0.9.103
## Title: ImproveAny |T136033: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 ImproveAny_TBC.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 20504
## Version: 0.9.102
## Version: 0.9.103
## Title: ImproveAny |T136033: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 ImproveAny_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 11504
## Version: 0.9.102
## Version: 0.9.103
## Title: ImproveAny |T136033: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 ImproveAny_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 30403
## Version: 0.9.102
## Version: 0.9.103
## Title: ImproveAny |T136033: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 @@ -268,7 +268,7 @@ function ImproveAny:Event(event, ...)
["icon"] = 136033,
["var"] = mmbtn,
["dbtab"] = IATAB,
["vTT"] = {{"ImproveAny |T136033:16:16:0:0|t", "v|cff3FC7EB0.9.102"}, {ImproveAny:GT("LEFTCLICK"), ImproveAny:GT("MMBTNLEFT")}, {ImproveAny:GT("RIGHTCLICK"), ImproveAny:GT("MMBTNRIGHT")}},
["vTT"] = {{"ImproveAny |T136033:16:16:0:0|t", "v|cff3FC7EB0.9.103"}, {ImproveAny:GT("LEFTCLICK"), ImproveAny:GT("MMBTNLEFT")}, {ImproveAny:GT("RIGHTCLICK"), ImproveAny:GT("MMBTNRIGHT")}},
["funcL"] = function()
ImproveAny:ToggleSettings()
end,
Expand Down
2 changes: 1 addition & 1 deletion ele/minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ function ImproveAny:InitMinimap()
for x, w in pairs(mmBtnsNames) do
if strfind(child:GetName(), w) and not tContains(mmbtns, child) and not strfind(child:GetName(), "Peggle") then
tinsert(mmbtns, child)
ImproveAny:ConvertToMinimapButton(child:GetName(), strfind(child:GetName(), "ImproveAnyMMBtns") ~= nil)
ImproveAny:ConvertToMinimapButton(child:GetName(), strfind(child:GetName(), "ImproveAnyMMBtns") ~= nil or strfind(child:GetName(), "BugSack") ~= nil or strfind(child:GetName(), "AutoQueueWA") ~= nil)
end
end
end
Expand Down
36 changes: 30 additions & 6 deletions libs/D4Lib/D4Frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ function D4:AddCategory(tab)
tab.parent.f:SetText(D4:Trans(tab.name))
end

function D4:CreateCheckbox(tab)
function D4:CreateCheckbox(tab, text)
if text == nil then
text = true
end

tab.sw = tab.sw or 25
tab.sh = tab.sh or 25
tab.parent = tab.parent or UIParent
Expand All @@ -31,9 +35,11 @@ function D4:CreateCheckbox(tab)
end
)

cb.f = cb:CreateFontString(nil, nil, "GameFontNormal")
cb.f:SetPoint("LEFT", cb, "RIGHT", 0, 0)
cb.f:SetText(D4:Trans(tab.name))
if text then
cb.f = cb:CreateFontString(nil, nil, "GameFontNormal")
cb.f:SetPoint("LEFT", cb, "RIGHT", 0, 0)
cb.f:SetText(D4:Trans(tab.name))
end

return cb
end
Expand Down Expand Up @@ -62,6 +68,22 @@ function D4:CreateCheckboxForCVAR(tab)
return cb
end

function D4:CreateSliderForCVAR(tab)
tab.sw = tab.sw or 25
tab.sh = tab.sh or 25
tab.parent = tab.parent or UIParent
tab.pTab = tab.pTab or "CENTER"
tab.value = tab.value or nil
local cb = D4:CreateCheckbox(tab, false)
tab.sw = 460
tab.value = tab.value2
tab.key = tab.key or tab.name or ""
tab.pTab = {tab.pTab[1], tab.pTab[2] + 32, tab.pTab[3] - 18}
D4:CreateSlider(tab)

return cb
end

function D4:CreateEditBox(tab)
tab.sw = tab.sw or 200
tab.sh = tab.sh or 25
Expand Down Expand Up @@ -91,7 +113,7 @@ function D4:CreateSlider(tab)
D4:MSG("[D4][CreateSlider] Missing format string:", tab.key, tab.value)

return
elseif tab.value == nil then
elseif tab.value == nil or type(tonumber(tab.value)) ~= "number" then
D4:MSG("[D4][CreateSlider] Missing value:", tab.key, tab.value)

return
Expand Down Expand Up @@ -154,7 +176,9 @@ function D4:CreateSlider(tab)
TAB[tab.key] = val
end

if tab.funcV then
if tab.funcV2 then
tab:funcV2(val)
elseif tab.funcV then
tab:funcV(val)
end

Expand Down
4 changes: 2 additions & 2 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ function ImproveAny:InitIASettings()
IASettings:Hide()
end

ImproveAny:SetVersion(AddonName, 136033, "0.9.102")
IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.102"))
ImproveAny:SetVersion(AddonName, 136033, "0.9.103")
IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.103"))
IASettings.CloseButton:SetScript(
"OnClick",
function()
Expand Down

0 comments on commit 0d25b37

Please sign in to comment.