完成焦点等开发
This commit is contained in:
@@ -96,8 +96,12 @@ local function GetDB()
|
||||
alertEnable = true,
|
||||
alertFadeDelay = ALERT_HOLD,
|
||||
scale = 1.0,
|
||||
followCursor = false,
|
||||
}
|
||||
end
|
||||
if SFramesDB.lootDisplay.followCursor == nil then
|
||||
SFramesDB.lootDisplay.followCursor = false
|
||||
end
|
||||
return SFramesDB.lootDisplay
|
||||
end
|
||||
|
||||
@@ -585,21 +589,30 @@ local function UpdateLootFrame()
|
||||
|
||||
ShowLootPage()
|
||||
|
||||
if not lootFrame._posApplied then
|
||||
local hasSaved = false
|
||||
if SFrames.Movers and SFrames.Movers.ApplyPosition then
|
||||
hasSaved = SFrames.Movers:ApplyPosition("LootFrame", lootFrame,
|
||||
"TOPLEFT", "UIParent", "TOPLEFT", 50, -200)
|
||||
end
|
||||
if hasSaved then
|
||||
lootFrame._posApplied = true
|
||||
end
|
||||
end
|
||||
if not lootFrame._posApplied then
|
||||
if db.followCursor then
|
||||
-- 跟随鼠标:每次打开都定位到鼠标附近
|
||||
local cx, cy = GetCursorPosition()
|
||||
local uiS = UIParent:GetEffectiveScale()
|
||||
lootFrame:ClearAllPoints()
|
||||
lootFrame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", cx / uiS - 30, cy / uiS + 16)
|
||||
else
|
||||
-- 固定位置:使用保存的位置或默认位置
|
||||
if not lootFrame._posApplied then
|
||||
local hasSaved = false
|
||||
if SFrames.Movers and SFrames.Movers.ApplyPosition then
|
||||
hasSaved = SFrames.Movers:ApplyPosition("LootFrame", lootFrame,
|
||||
"TOPLEFT", "UIParent", "TOPLEFT", 50, -200)
|
||||
end
|
||||
if hasSaved then
|
||||
lootFrame._posApplied = true
|
||||
end
|
||||
end
|
||||
if not lootFrame._posApplied then
|
||||
local cx, cy = GetCursorPosition()
|
||||
local uiS = UIParent:GetEffectiveScale()
|
||||
lootFrame:ClearAllPoints()
|
||||
lootFrame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", cx / uiS - 30, cy / uiS + 16)
|
||||
end
|
||||
end
|
||||
|
||||
lootFrame:Show()
|
||||
|
||||
Reference in New Issue
Block a user