Skip to content

Commit

Permalink
v1.7.31
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Oct 1, 2024
1 parent 25e4aef commit 0d560a0
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 25 deletions.
2 changes: 1 addition & 1 deletion MoveAny.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Interface-Cata: 40400
## Interface: 110002

## Version: 1.7.30
## Version: 1.7.31
## Title: MoveAny by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Move Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion MoveAny_Cata.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 40400
## Version: 1.7.30
## Version: 1.7.31
## Title: MoveAny |T135994:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Move Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion MoveAny_TBC.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 20504
## Version: 1.7.30
## Version: 1.7.31
## Title: MoveAny |T135994:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Move Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion MoveAny_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 11504
## Version: 1.7.30
## Version: 1.7.31
## Title: MoveAny |T135994:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Move Any Ui or Frame
## Author: D4KiR
Expand Down
2 changes: 1 addition & 1 deletion MoveAny_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 30403
## Version: 1.7.30
## Version: 1.7.31
## Title: MoveAny |T135994:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
## Notes: Move Any Ui or Frame
## Author: D4KiR
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
10 changes: 5 additions & 5 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ function MoveAny:InitMALock()
end
)

MoveAny:SetVersion(AddonName, 135994, "1.7.30")
MALock.TitleText:SetText(format("MoveAny |T135994:16:16:0:0|t v|cff3FC7EB%s", "1.7.30"))
MoveAny:SetVersion(AddonName, 135994, "1.7.31")
MALock.TitleText:SetText(format("MoveAny |T135994:16:16:0:0|t v|cff3FC7EB%s", "1.7.31"))
MALock.CloseButton:SetScript(
"OnClick",
function()
Expand Down Expand Up @@ -1097,7 +1097,7 @@ function MoveAny:ShowProfiles()
end
)

MAProfiles.TitleText:SetText(format("MoveAny |T135994:16:16:0:0|t v|cff3FC7EB%s", "1.7.30"))
MAProfiles.TitleText:SetText(format("MoveAny |T135994:16:16:0:0|t v|cff3FC7EB%s", "1.7.31"))
MAProfiles.CloseButton:SetScript(
"OnClick",
function()
Expand Down Expand Up @@ -3344,7 +3344,7 @@ function MoveAny:LoadAddon()
end
)

PetFrame:SetParent(MAPetFrame)
--PetFrame:SetParent(MAPetFrame)
MoveAny:SetPoint(PetFrame, "CENTER", MAPetFrame, "CENTER", 0, 0)
MoveAny:RegisterWidget(
{
Expand Down Expand Up @@ -4858,7 +4858,7 @@ function MoveAny:LoadAddon()
["name"] = "MoveAny",
["icon"] = 135994,
["dbtab"] = MATAB,
["vTT"] = {{"MoveAny |T135994:16:16:0:0|t", "v|cff3FC7EB1.7.30"}, {MoveAny:GT("LID_LEFTCLICK"), MoveAny:GT("LID_MMBTNLEFT")}, {MoveAny:GT("LID_RIGHTCLICK"), MoveAny:GT("LID_MMBTNRIGHT")}},
["vTT"] = {{"MoveAny |T135994:16:16:0:0|t", "v|cff3FC7EB1.7.31"}, {MoveAny:GT("LID_LEFTCLICK"), MoveAny:GT("LID_MMBTNLEFT")}, {MoveAny:GT("LID_RIGHTCLICK"), MoveAny:GT("LID_MMBTNRIGHT")}},
["funcL"] = function()
MoveAny:ToggleMALock()
end,
Expand Down

0 comments on commit 0d560a0

Please sign in to comment.