完成多出修改
修复拾取界面点击无效问题 修复宠物训练界面不显示训练点问题 新增天赋分享到聊天界面 修复飞行界面无法关闭问题 修复术士宠物的显示问题 为天赋界面添加默认数据库支持 框架现在也可自主选择是否启用 玩家框架和目标框架可取消显示3D头像以及透明度修改 背包和银行也添加透明度自定义支持 优化tooltip性能和背包物品显示方式 修复布局模式在ui缩放后不能正常定位的问题 添加硬核模式危险和死亡的工会通报 添加拾取和已拾取的框体 等等
This commit is contained in:
@@ -21,6 +21,7 @@ local DEFAULTS = {
|
||||
buttonGap = 2,
|
||||
smallBarSize = 27,
|
||||
scale = 1.0,
|
||||
alpha = 1.0,
|
||||
barCount = 3,
|
||||
showHotkey = true,
|
||||
showMacroName = false,
|
||||
@@ -442,7 +443,12 @@ function AB:CreateBars()
|
||||
local anchor = CreateFrame("Frame", "SFramesActionBarAnchor", UIParent)
|
||||
anchor:SetWidth(rowWidth)
|
||||
anchor:SetHeight(size * 3 + gap * 2)
|
||||
anchor:SetPoint("BOTTOM", UIParent, "BOTTOM", db.bottomOffsetX, db.bottomOffsetY)
|
||||
local abPos = SFramesDB and SFramesDB.Positions and SFramesDB.Positions["ActionBarBottom"]
|
||||
if abPos and abPos.point and abPos.relativePoint then
|
||||
anchor:SetPoint(abPos.point, UIParent, abPos.relativePoint, abPos.xOfs or 0, abPos.yOfs or 0)
|
||||
else
|
||||
anchor:SetPoint("BOTTOM", UIParent, "BOTTOM", db.bottomOffsetX, db.bottomOffsetY)
|
||||
end
|
||||
anchor:SetScale(db.scale)
|
||||
self.anchor = anchor
|
||||
|
||||
@@ -582,7 +588,12 @@ function AB:CreateBars()
|
||||
local rightHolder = CreateFrame("Frame", "SFramesRightBarHolder", UIParent)
|
||||
rightHolder:SetWidth(size * 2 + gap)
|
||||
rightHolder:SetHeight((size + gap) * BUTTONS_PER_ROW - gap)
|
||||
rightHolder:SetPoint("RIGHT", UIParent, "RIGHT", db.rightOffsetX, db.rightOffsetY)
|
||||
local rbPos = SFramesDB and SFramesDB.Positions and SFramesDB.Positions["ActionBarRight"]
|
||||
if rbPos and rbPos.point and rbPos.relativePoint then
|
||||
rightHolder:SetPoint(rbPos.point, UIParent, rbPos.relativePoint, rbPos.xOfs or 0, rbPos.yOfs or 0)
|
||||
else
|
||||
rightHolder:SetPoint("RIGHT", UIParent, "RIGHT", db.rightOffsetX, db.rightOffsetY)
|
||||
end
|
||||
rightHolder:SetScale(db.scale)
|
||||
self.rightHolder = rightHolder
|
||||
|
||||
@@ -761,6 +772,15 @@ function AB:ApplyConfig()
|
||||
end
|
||||
end
|
||||
|
||||
-- Alpha
|
||||
local alpha = db.alpha or 1
|
||||
if alpha < 0.1 then alpha = 0.1 end
|
||||
if alpha > 1 then alpha = 1 end
|
||||
if self.anchor then self.anchor:SetAlpha(alpha) end
|
||||
if self.rightHolder then self.rightHolder:SetAlpha(alpha) end
|
||||
if self.stanceHolder then self.stanceHolder:SetAlpha(alpha) end
|
||||
if self.petHolder then self.petHolder:SetAlpha(alpha) end
|
||||
|
||||
-- Hotkey / macro name(使用缓存表,避免每次 ApplyConfig 都分配临时表)
|
||||
if not self.allButtonsCache then
|
||||
self.allButtonsCache = {}
|
||||
@@ -1000,11 +1020,23 @@ function AB:ApplyGryphon()
|
||||
local ox = db.gryphonOffsetX or 30
|
||||
local oy = db.gryphonOffsetY or 0
|
||||
|
||||
local positions = SFramesDB and SFramesDB.Positions
|
||||
|
||||
self.gryphonLeft:ClearAllPoints()
|
||||
self.gryphonLeft:SetPoint("BOTTOMRIGHT", self.anchor, "BOTTOMLEFT", ox, oy)
|
||||
local posL = positions and positions["GryphonLeft"]
|
||||
if posL and posL.point and posL.relativePoint then
|
||||
self.gryphonLeft:SetPoint(posL.point, UIParent, posL.relativePoint, posL.xOfs or 0, posL.yOfs or 0)
|
||||
else
|
||||
self.gryphonLeft:SetPoint("BOTTOMRIGHT", self.anchor, "BOTTOMLEFT", ox, oy)
|
||||
end
|
||||
|
||||
self.gryphonRight:ClearAllPoints()
|
||||
self.gryphonRight:SetPoint("BOTTOMLEFT", self.anchor, "BOTTOMRIGHT", -ox, oy)
|
||||
local posR = positions and positions["GryphonRight"]
|
||||
if posR and posR.point and posR.relativePoint then
|
||||
self.gryphonRight:SetPoint(posR.point, UIParent, posR.relativePoint, posR.xOfs or 0, posR.yOfs or 0)
|
||||
else
|
||||
self.gryphonRight:SetPoint("BOTTOMLEFT", self.anchor, "BOTTOMRIGHT", -ox, oy)
|
||||
end
|
||||
|
||||
self.gryphonLeft:Show()
|
||||
self.gryphonRight:Show()
|
||||
@@ -1015,13 +1047,25 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
function AB:ApplyPosition()
|
||||
local db = self:GetDB()
|
||||
local positions = SFramesDB and SFramesDB.Positions
|
||||
|
||||
if self.anchor then
|
||||
self.anchor:ClearAllPoints()
|
||||
self.anchor:SetPoint("BOTTOM", UIParent, "BOTTOM", db.bottomOffsetX, db.bottomOffsetY)
|
||||
local pos = positions and positions["ActionBarBottom"]
|
||||
if pos and pos.point and pos.relativePoint then
|
||||
self.anchor:SetPoint(pos.point, UIParent, pos.relativePoint, pos.xOfs or 0, pos.yOfs or 0)
|
||||
else
|
||||
self.anchor:SetPoint("BOTTOM", UIParent, "BOTTOM", db.bottomOffsetX, db.bottomOffsetY)
|
||||
end
|
||||
end
|
||||
if self.rightHolder then
|
||||
self.rightHolder:ClearAllPoints()
|
||||
self.rightHolder:SetPoint("RIGHT", UIParent, "RIGHT", db.rightOffsetX, db.rightOffsetY)
|
||||
local pos = positions and positions["ActionBarRight"]
|
||||
if pos and pos.point and pos.relativePoint then
|
||||
self.rightHolder:SetPoint(pos.point, UIParent, pos.relativePoint, pos.xOfs or 0, pos.yOfs or 0)
|
||||
else
|
||||
self.rightHolder:SetPoint("RIGHT", UIParent, "RIGHT", db.rightOffsetX, db.rightOffsetY)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1435,6 +1479,35 @@ function AB:Initialize()
|
||||
SFrames:RegisterEvent("ZONE_CHANGED", FixRowAnchors)
|
||||
SFrames:RegisterEvent("ZONE_CHANGED_NEW_AREA", FixRowAnchors)
|
||||
SFrames:RegisterEvent("ZONE_CHANGED_INDOORS", FixRowAnchors)
|
||||
|
||||
-- Register movers
|
||||
if SFrames.Movers and SFrames.Movers.RegisterMover then
|
||||
if self.anchor then
|
||||
SFrames.Movers:RegisterMover("ActionBarBottom", self.anchor, "底部动作条",
|
||||
"BOTTOM", "UIParent", "BOTTOM", db.bottomOffsetX, db.bottomOffsetY,
|
||||
function() AB:ApplyStanceBar(); AB:ApplyPetBar(); AB:ApplyGryphon() end)
|
||||
end
|
||||
if self.rightHolder then
|
||||
SFrames.Movers:RegisterMover("ActionBarRight", self.rightHolder, "右侧动作条",
|
||||
"RIGHT", "UIParent", "RIGHT", db.rightOffsetX, db.rightOffsetY)
|
||||
end
|
||||
if self.stanceHolder then
|
||||
SFrames.Movers:RegisterMover("StanceBar", self.stanceHolder, "姿态条",
|
||||
"BOTTOMLEFT", "SFramesActionBarAnchor", "TOPLEFT", 0, db.buttonGap)
|
||||
end
|
||||
if self.petHolder then
|
||||
SFrames.Movers:RegisterMover("PetBar", self.petHolder, "宠物条",
|
||||
"BOTTOMLEFT", "SFramesActionBarAnchor", "TOPLEFT", 0, db.buttonGap)
|
||||
end
|
||||
if self.gryphonLeft then
|
||||
SFrames.Movers:RegisterMover("GryphonLeft", self.gryphonLeft, "狮鹫(左)",
|
||||
"BOTTOMRIGHT", "SFramesActionBarAnchor", "BOTTOMLEFT", db.gryphonOffsetX or 30, db.gryphonOffsetY or 0)
|
||||
end
|
||||
if self.gryphonRight then
|
||||
SFrames.Movers:RegisterMover("GryphonRight", self.gryphonRight, "狮鹫(右)",
|
||||
"BOTTOMLEFT", "SFramesActionBarAnchor", "BOTTOMRIGHT", -(db.gryphonOffsetX or 30), db.gryphonOffsetY or 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user