Skip to content

Commit

Permalink
v1.7.39
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kir92 committed Oct 9, 2024
1 parent b203081 commit 1bfb117
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 69 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.38
## Version: 1.7.39
## 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.38
## Version: 1.7.39
## 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.38
## Version: 1.7.39
## 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.38
## Version: 1.7.39
## 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.38
## Version: 1.7.39
## 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
30 changes: 30 additions & 0 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,36 @@ local MAHIDDEN = CreateFrame("Frame", "MAHIDDEN")
MAHIDDEN:Hide()
MAHIDDEN.unit = "player"
MAHIDDEN.auraRows = 0
local sethidden = {}
local sethiddenSetup = {}
function MoveAny:HideFrame(frame)
sethidden[frame] = true
if sethiddenSetup[frame] == nil then
sethiddenSetup[frame] = true
local setalpha = false
hooksecurefunc(
frame,
"SetAlpha",
function(sel, alpha)
if sethidden[sel] == nil then return end
if setalpha then return end
setalpha = true
sel:SetAlpha(0)
setalpha = false
end
)
end

frame:SetAlpha(0)
frame:EnableMouse(false)
end

function MoveAny:ShowFrame(frame)
sethidden[frame] = nil
frame:SetAlpha(1)
frame:EnableMouse(true)
end

--[[ HIDEPANEL ]]
--[[ NEW ]]
local MAUIP = CreateFrame("Frame", "UIParent")
Expand Down
15 changes: 10 additions & 5 deletions ele/debuffbar.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
local _, MoveAny = ...
local btnsize = 36
local debuffs = {}
local once = true
local MADebuffBar = nil
function MoveAny:GetDebuffBar()
return MADebuffBar
end

function MoveAny:GetDebuffPosition(p1, p3)
MoveAny:GetEleOptions("MADebuffBar", "GetBuffPosition")["MADEBUFFMODE"] = MoveAny:GetEleOptions("MADebuffBar", "GetBuffPosition")["MADEBUFFMODE"] or 0
if MoveAny:GetEleOptions("MADebuffBar", "GetBuffPosition")["MADEBUFFMODE"] == 0 then
Expand All @@ -26,7 +32,6 @@ function MoveAny:GetDebuffPosition(p1, p3)
return "TOPRIGHT", "TOPRIGHT"
end

local once = true
function MoveAny:InitDebuffBar()
if MoveAny:IsEnabled("DEBUFFS", false) then
MADebuffBar = CreateFrame("Frame", nil, MoveAny:GetMainPanel())
Expand All @@ -38,7 +43,7 @@ function MoveAny:InitDebuffBar()
MADebuffBar:SetSize(sw1, sh1)
end

function MALoadDebuff()
function MoveAny:LoadDebuffButtons()
for i = 1, 32 do
local debuffBtn = _G["DebuffButton" .. i]
if debuffBtn and not tContains(debuffs, debuffBtn) then
Expand Down Expand Up @@ -93,10 +98,10 @@ function MoveAny:InitDebuffBar()
end
end

C_Timer.After(0.3, MALoadDebuff)
C_Timer.After(0.3, MoveAny.LoadDebuffButtons)
end

MALoadDebuff()
MoveAny:LoadDebuffButtons()
if MoveAny:DEBUG() then
DebuffButton1.t = DebuffButton1:CreateTexture()
DebuffButton1.t:SetAllPoints(DebuffButton1)
Expand Down Expand Up @@ -258,7 +263,7 @@ function MoveAny:InitDebuffBar()
"OnEvent",
function(sel, event, ...)
if event == "UNIT_AURA" then
unit = ...
local unit = ...
if unit and unit == "player" then
MoveAny:UpdateDebuffs()
end
Expand Down
62 changes: 8 additions & 54 deletions registerwidgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -314,38 +314,17 @@ function MoveAny:MenuOptions(opt, frame)
function()
local checked = hide:GetChecked()
MoveAny:SetEleOption(name, "Hide", checked)
local maframe1 = _G["MA" .. name]
local maframe2 = _G[string.gsub(name, "MA", "")]
local dragf = _G[name .. "_MA_DRAG"]
if checked then
frame.oldparent = frame.oldparent or frame:GetParent()
frame:SetParent(MAHIDDEN)
if maframe1 then
maframe1.oldparent = maframe1.oldparent or maframe1:GetParent()
maframe1:SetParent(MAHIDDEN)
end

if maframe2 then
maframe2.oldparent = maframe2.oldparent or maframe2:GetParent()
maframe2:SetParent(MAHIDDEN)
end

MoveAny:HideFrame(frame)
dragf.t:SetVertexColor(MoveAny:GetColor("hidden"))
if MoveAny:IsEnabled("HIDEHIDDENFRAMES", false) then
dragf:Hide()
else
dragf:Show()
end
else
frame:SetParent(frame.oldparent)
if maframe1 then
maframe1:SetParent(maframe1.oldparent)
end

if maframe2 then
maframe2:SetParent(maframe2.oldparent)
end

MoveAny:ShowFrame(frame)
if MACurrentEle == frame then
dragf.t:SetVertexColor(MoveAny:GetColor("se"))
else
Expand Down Expand Up @@ -1366,37 +1345,12 @@ function MoveAny:RegisterWidget(tab)
frame:SetClampedToScreen(true)
end

local maframe1 = _G["MA" .. name]
local maframe2 = _G[string.gsub(name, "MA", "")]
if MoveAny:GetEleOption(name, "Hide", false, "Hide2") then
frame.oldparent = frame.oldparent or frame:GetParent()
hooksecurefunc(
frame,
"SetParent",
function(sel, newParent)
if sel.ma_setparent then return end
sel.ma_setparent = true
if MoveAny:GetEleOption(name, "Hide", false, "Hide3") then
sel:SetParent(MAHIDDEN)
else
sel:SetParent(sel.oldparent)
end

sel.ma_setparent = false
end
)

frame:SetParent(MAHIDDEN)
if maframe1 then
maframe1.oldparent = maframe1.oldparent or frame:GetParent()
maframe1:SetParent(MAHIDDEN)
end

if maframe2 then
maframe2.oldparent = maframe2.oldparent or frame:GetParent()
maframe2:SetParent(MAHIDDEN)
end
if frame ~= Minimap and frame ~= MinimapCluster and frame.SetIgnoreParentAlpha ~= nil then
frame:SetIgnoreParentAlpha(true)
end

if MoveAny:GetEleOption(name, "Hide", false, "Hide2") then
MoveAny:HideFrame(frame)
dragf.t:SetVertexColor(MoveAny:GetColor("hidden"))
if MoveAny:IsEnabled("HIDEHIDDENFRAMES", false) then
dragf:Hide()
Expand Down Expand Up @@ -1443,7 +1397,7 @@ function MoveAny:RegisterWidget(tab)
)

frame:UpdateBuffMouse()
elseif frame == MADebuffBar then
elseif frame == MoveAny:GetDebuffBar() then
function frame:UpdateDebuffMouse()
for i = 1, 32 do
local db = _G["DebuffButton" .. i]
Expand Down
9 changes: 4 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.38")
MALock.TitleText:SetText(format("MoveAny |T135994:16:16:0:0|t v|cff3FC7EB%s", "1.7.38"))
MoveAny:SetVersion(AddonName, 135994, "1.7.39")
MALock.TitleText:SetText(format("MoveAny |T135994:16:16:0:0|t v|cff3FC7EB%s", "1.7.39"))
MALock.CloseButton:SetScript(
"OnClick",
function()
Expand Down Expand Up @@ -1103,7 +1103,7 @@ function MoveAny:ShowProfiles()
end
)

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

if MoveAny:GetWoWBuild() ~= "RETAIL" and (MoveAny:IsEnabled("ACTIONBAR" .. 3, false) or MoveAny:IsEnabled("ACTIONBAR" .. 3, false) or MoveAny:IsEnabled("MINIMAP", false)) and MultiBarRight and MultiBarLeft then end
if MoveAny:GetWoWBuild() ~= "RETAIL" and MoveAny:AnyActionbarEnabled() then
for i = 1, 10 do
if i ~= 2 and ((i == 1 or i == 5 or i == 6) and MoveAny:IsEnabled("ACTIONBARS", false)) or MoveAny:IsEnabled("ACTIONBAR" .. i, false) then
Expand Down Expand Up @@ -4846,7 +4845,7 @@ function MoveAny:LoadAddon()
["name"] = "MoveAny",
["icon"] = 135994,
["dbtab"] = MATAB,
["vTT"] = {{"MoveAny |T135994:16:16:0:0|t", "v|cff3FC7EB1.7.38"}, {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.39"}, {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 1bfb117

Please sign in to comment.