mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 14:00:48 +00:00
loot: add option to manually set position
This commit is contained in:
@@ -67,6 +67,7 @@ function pfUI:LoadConfig()
|
|||||||
|
|
||||||
pfUI:UpdateConfig("loot", nil, "autoresize", "1")
|
pfUI:UpdateConfig("loot", nil, "autoresize", "1")
|
||||||
pfUI:UpdateConfig("loot", nil, "autopickup", "1")
|
pfUI:UpdateConfig("loot", nil, "autopickup", "1")
|
||||||
|
pfUI:UpdateConfig("loot", nil, "mousecursor", "1")
|
||||||
|
|
||||||
pfUI:UpdateConfig("unitframes", nil, "disable", "0")
|
pfUI:UpdateConfig("unitframes", nil, "disable", "0")
|
||||||
pfUI:UpdateConfig("unitframes", nil, "pastel", "1")
|
pfUI:UpdateConfig("unitframes", nil, "pastel", "1")
|
||||||
|
|||||||
@@ -1291,6 +1291,7 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
if not this.setup then
|
if not this.setup then
|
||||||
CreateConfig(this, T["Enable Auto-Resize Loot Frame"], C.loot, "autoresize", "checkbox")
|
CreateConfig(this, T["Enable Auto-Resize Loot Frame"], C.loot, "autoresize", "checkbox")
|
||||||
CreateConfig(this, T["Disable Loot Confirmation Dialog (Without Group)"], C.loot, "autopickup", "checkbox")
|
CreateConfig(this, T["Disable Loot Confirmation Dialog (Without Group)"], C.loot, "autopickup", "checkbox")
|
||||||
|
CreateConfig(this, T["Enable Loot Window On MouseCursor"], C.loot, "mousecursor", "checkbox")
|
||||||
this.setup = true
|
this.setup = true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
+14
-5
@@ -10,6 +10,13 @@ pfUI:RegisterModule("loot", function ()
|
|||||||
pfUI.loot:RegisterEvent("LOOT_BIND_CONFIRM")
|
pfUI.loot:RegisterEvent("LOOT_BIND_CONFIRM")
|
||||||
|
|
||||||
pfUI.loot:SetWidth(160+C.appearance.border.default*2)
|
pfUI.loot:SetWidth(160+C.appearance.border.default*2)
|
||||||
|
|
||||||
|
if C.loot.mousecursor == "0" then
|
||||||
|
pfUI.loot:SetHeight(160+C.appearance.border.default*2)
|
||||||
|
pfUI.loot:SetPoint("TOP", UIParent, "CENTER", 0, 0)
|
||||||
|
UpdateMovable(pfUI.loot)
|
||||||
|
end
|
||||||
|
|
||||||
pfUI.loot.slots = {}
|
pfUI.loot.slots = {}
|
||||||
function pfUI.loot:UpdateLootFrame()
|
function pfUI.loot:UpdateLootFrame()
|
||||||
local maxrarity, maxwidth = 0, 0
|
local maxrarity, maxwidth = 0, 0
|
||||||
@@ -198,12 +205,14 @@ pfUI:RegisterModule("loot", function ()
|
|||||||
CloseLoot(not autoLoot)
|
CloseLoot(not autoLoot)
|
||||||
end
|
end
|
||||||
|
|
||||||
local x, y = GetCursorPosition()
|
if C.loot.mousecursor == "1" then
|
||||||
x = x / this:GetEffectiveScale()
|
local x, y = GetCursorPosition()
|
||||||
y = y / this:GetEffectiveScale()
|
x = x / this:GetEffectiveScale()
|
||||||
|
y = y / this:GetEffectiveScale()
|
||||||
|
|
||||||
this:ClearAllPoints()
|
this:ClearAllPoints()
|
||||||
this:SetPoint("TOPLEFT", nil, "BOTTOMLEFT", x-40, y+20)
|
this:SetPoint("TOPLEFT", nil, "BOTTOMLEFT", x-40, y+20)
|
||||||
|
end
|
||||||
|
|
||||||
pfUI.loot:UpdateLootFrame()
|
pfUI.loot:UpdateLootFrame()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user