Skip to content

Commit

Permalink
v0.9.104
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Oct 5, 2024
1 parent 0d25b37 commit ab087a6
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 36 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.103
## Version: 0.9.104
## 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.103
## Version: 0.9.104
## 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.103
## Version: 0.9.104
## 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.103
## Version: 0.9.104
## 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.103
## Version: 0.9.104
## 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
39 changes: 25 additions & 14 deletions 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.103"}, {ImproveAny:GT("LEFTCLICK"), ImproveAny:GT("MMBTNLEFT")}, {ImproveAny:GT("RIGHTCLICK"), ImproveAny:GT("MMBTNRIGHT")}},
["vTT"] = {{"ImproveAny |T136033:16:16:0:0|t", "v|cff3FC7EB0.9.104"}, {ImproveAny:GT("LEFTCLICK"), ImproveAny:GT("MMBTNLEFT")}, {ImproveAny:GT("RIGHTCLICK"), ImproveAny:GT("MMBTNRIGHT")}},
["funcL"] = function()
ImproveAny:ToggleSettings()
end,
Expand Down Expand Up @@ -1010,19 +1010,30 @@ function ImproveAny:Event(event, ...)
DetailsInset:SetSize(302, 339 + tall)
DetailsInset:SetPoint("TOPLEFT", _G["ClassTrainerFrame"], "TOPLEFT", 348, -72)
DetailsInset:SetTexture("Interface\\ACHIEVEMENTFRAME\\UI-GuildAchievement-Parchment-Horizontal-Desaturated")
_G["ClassTrainerTrainButton"]:ClearAllPoints()
_G["ClassTrainerTrainButton"]:SetPoint("RIGHT", _G["ClassTrainerCancelButton"], "LEFT", -1, 0)
_G["ClassTrainerCancelButton"]:SetSize(80, 22)
_G["ClassTrainerCancelButton"]:SetText(CLOSE)
_G["ClassTrainerCancelButton"]:ClearAllPoints()
_G["ClassTrainerCancelButton"]:SetPoint("BOTTOMRIGHT", _G["ClassTrainerFrame"], "BOTTOMRIGHT", -42, 54)
_G["ClassTrainerFrameCloseButton"]:ClearAllPoints()
_G["ClassTrainerFrameCloseButton"]:SetPoint("TOPRIGHT", _G["ClassTrainerFrame"], "TOPRIGHT", -30, -8)
ClassTrainerFrameFilterDropDown:ClearAllPoints()
ClassTrainerFrameFilterDropDown:SetPoint("TOPLEFT", ClassTrainerFrame, "TOPLEFT", 501, -40)
ClassTrainerMoneyFrame:ClearAllPoints()
ClassTrainerMoneyFrame:SetPoint("TOPLEFT", _G["ClassTrainerFrame"], "TOPLEFT", 143, -49)
ClassTrainerGreetingText:Hide()
if _G["ClassTrainerTrainButton"] and _G["ClassTrainerCancelButton"] and _G["ClassTrainerFrameCloseButton"] then
_G["ClassTrainerTrainButton"]:ClearAllPoints()
_G["ClassTrainerTrainButton"]:SetPoint("RIGHT", _G["ClassTrainerCancelButton"], "LEFT", -1, 0)
_G["ClassTrainerCancelButton"]:SetSize(80, 22)
_G["ClassTrainerCancelButton"]:SetText(CLOSE)
_G["ClassTrainerCancelButton"]:ClearAllPoints()
_G["ClassTrainerCancelButton"]:SetPoint("BOTTOMRIGHT", _G["ClassTrainerFrame"], "BOTTOMRIGHT", -42, 54)
_G["ClassTrainerFrameCloseButton"]:ClearAllPoints()
_G["ClassTrainerFrameCloseButton"]:SetPoint("TOPRIGHT", _G["ClassTrainerFrame"], "TOPRIGHT", -30, -8)
end

if ClassTrainerFrameFilterDropDown then
ClassTrainerFrameFilterDropDown:ClearAllPoints()
ClassTrainerFrameFilterDropDown:SetPoint("TOPLEFT", ClassTrainerFrame, "TOPLEFT", 501, -40)
end

if ClassTrainerMoneyFrame then
ClassTrainerMoneyFrame:ClearAllPoints()
ClassTrainerMoneyFrame:SetPoint("TOPLEFT", _G["ClassTrainerFrame"], "TOPLEFT", 143, -49)
end

if ClassTrainerGreetingText then
ClassTrainerGreetingText:Hide()
end
end

if ImproveAny:IsAddOnLoaded("Blizzard_TrainerUI") then
Expand Down
40 changes: 25 additions & 15 deletions libs/D4Lib/D4Frames.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local _, D4 = ...
local X = 0
local Y = 0
local PARENT = nil
local TAB = nil
Expand Down Expand Up @@ -242,6 +243,14 @@ function D4:CreateFrame(tab)
return fra
end

function D4:SetAppendX(newX)
X = newX
end

function D4:GetAppendX()
return X
end

function D4:SetAppendY(newY)
Y = newY
end
Expand Down Expand Up @@ -273,7 +282,7 @@ function D4:AppendCategory(name, x, y)
{
["name"] = name,
["parent"] = PARENT,
["pTab"] = {"TOPLEFT", x or 5, y or Y},
["pTab"] = {"TOPLEFT", x or X, y or Y},
}
)

Expand All @@ -284,7 +293,7 @@ end

function D4:AppendCheckbox(key, value, func, x, y)
value = value or false
x = x or 5
x = x or X
if TAB == nil then
if TABIsNil == false then
TABIsNil = true
Expand All @@ -303,7 +312,7 @@ function D4:AppendCheckbox(key, value, func, x, y)
{
["name"] = key,
["parent"] = PARENT,
["pTab"] = {"TOPLEFT", x, y or Y},
["pTab"] = {"TOPLEFT", x or X, y or Y},
["value"] = val,
["funcV"] = function(sel, checked)
TAB[key] = checked
Expand Down Expand Up @@ -355,7 +364,7 @@ function D4:AppendSlider(key, value, min, max, steps, decimals, func, lstr)
slider.decimals = decimals
slider.color = {0, 1, 0, 1}
slider.func = func
slider.pTab = {"TOPLEFT", 10, Y}
slider.pTab = {"TOPLEFT", X + 5, Y}
D4:CreateSlider(slider)
Y = Y - 30
end
Expand All @@ -366,23 +375,23 @@ function D4:CreateDropdown(key, value, choices, parent)
end

local text = parent:CreateFontString(nil, nil, "GameFontNormal")
text:SetPoint("TOPLEFT", 10, Y)
text:SetPoint("TOPLEFT", X + 5, Y)
text:SetText(D4:Trans(key))
Y = Y - 18
if D4:GetWoWBuild() == "RETAIL" then
local Dropdown = CreateFrame("DropdownButton", key, parent, "WowStyle1DropdownTemplate")
Dropdown:SetDefaultText(choices[TAB[key]])
Dropdown:SetPoint("TOPLEFT", 10, Y)
Dropdown:SetDefaultText(D4:Trans(choices[TAB[key]]))
Dropdown:SetPoint("TOPLEFT", X + 5, Y)
Dropdown:SetWidth(200)
Dropdown:SetupMenu(
function(dropdown, rootDescription)
rootDescription:CreateTitle(D4:Trans(key))
for i, v in pairs(choices) do
for data, name in pairs(choices) do
rootDescription:CreateButton(
i,
D4:Trans(name),
function()
TAB[key] = v
Dropdown:SetDefaultText(i)
TAB[key] = data
Dropdown:SetDefaultText(D4:Trans(name))
end
)
end
Expand All @@ -395,10 +404,10 @@ function D4:CreateDropdown(key, value, choices, parent)
function WPDropDownDemo_Menu(frame, level, menuList)
local info = UIDropDownMenu_CreateInfo()
if level == 1 then
for i, v in pairs(choices) do
info.text = v
info.arg1 = i
info.checked = v == choices[TAB[key]]
for data, name in pairs(choices) do
info.text = D4:Trans(name)
info.arg1 = data
info.checked = name == choices[TAB[key]]
info.func = dropDown.SetValue
UIDropDownMenu_AddButton(info)
end
Expand All @@ -416,6 +425,7 @@ function D4:CreateDropdown(key, value, choices, parent)
end

function D4:AppendDropdown(key, value, choices)
Y = Y - 10
D4:CreateDropdown(key, value, choices, PARENT)
Y = Y - 30
end
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.103")
IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.103"))
ImproveAny:SetVersion(AddonName, 136033, "0.9.104")
IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.104"))
IASettings.CloseButton:SetScript(
"OnClick",
function()
Expand Down

0 comments on commit ab087a6

Please sign in to comment.