完成多出修改

修复拾取界面点击无效问题
修复宠物训练界面不显示训练点问题
新增天赋分享到聊天界面
修复飞行界面无法关闭问题
修复术士宠物的显示问题
为天赋界面添加默认数据库支持
框架现在也可自主选择是否启用
玩家框架和目标框架可取消显示3D头像以及透明度修改
背包和银行也添加透明度自定义支持
优化tooltip性能和背包物品显示方式
修复布局模式在ui缩放后不能正常定位的问题
添加硬核模式危险和死亡的工会通报
添加拾取和已拾取的框体
等等
This commit is contained in:
rucky
2026-03-23 10:25:25 +08:00
parent 63337b14d2
commit ec9e3c29d6
34 changed files with 13897 additions and 578 deletions

View File

@@ -338,6 +338,7 @@ local function GetDefaultChoices()
minimapShowClock = true,
minimapShowCoords = true,
minimapMapStyle = "auto",
minimapMapShape = "circle",
buffEnabled = true,
buffIconSize = 30,
buffIconsPerRow = 8,
@@ -395,6 +396,7 @@ local function GetCurrentChoices()
if db.Minimap.showClock ~= nil then c.minimapShowClock = db.Minimap.showClock end
if db.Minimap.showCoords ~= nil then c.minimapShowCoords = db.Minimap.showCoords end
if db.Minimap.mapStyle ~= nil then c.minimapMapStyle = db.Minimap.mapStyle end
if db.Minimap.mapShape ~= nil then c.minimapMapShape = db.Minimap.mapShape end
end
if db.MinimapBuffs then
if db.MinimapBuffs.enabled ~= nil then c.buffEnabled = db.MinimapBuffs.enabled end
@@ -459,6 +461,7 @@ local function ApplyChoices()
SFramesDB.Minimap.showClock = c.minimapShowClock
SFramesDB.Minimap.showCoords = c.minimapShowCoords
SFramesDB.Minimap.mapStyle = c.minimapMapStyle
SFramesDB.Minimap.mapShape = c.minimapMapShape
if type(SFramesDB.MinimapBuffs) ~= "table" then SFramesDB.MinimapBuffs = {} end
SFramesDB.MinimapBuffs.enabled = c.buffEnabled
@@ -816,12 +819,122 @@ local function BuildExtras(page)
MakeCheck(p, "显示坐标", x + 160, y,
function() return choices.minimapShowCoords end,
function(v) choices.minimapShowCoords = v end)
local function GetMode()
local shape = choices.minimapMapShape or "circle"
if shape == "square1" or shape == "square2" then return "square" end
if (choices.minimapMapStyle or "auto") == "auto" then return "auto" end
return "round"
end
local circleFrame = CreateFrame("Frame", nil, p)
circleFrame:SetPoint("TOPLEFT", p, "TOPLEFT", x, y - 50)
circleFrame:SetWidth(CONTENT_W)
circleFrame:SetHeight(56)
circleFrame:Hide()
MakeLabel(circleFrame, "圆形边框:", 0, 0, 10, 0.78, 0.72, 0.76)
local mapStyles = SFrames.Minimap and SFrames.Minimap.MAP_STYLES or {}
local CS, CG = 28, 4
local circleBtns = {}
local autoStyleBtn = MakeButton(circleFrame, "自动", 38, CS, nil)
autoStyleBtn:ClearAllPoints()
autoStyleBtn:SetPoint("TOPLEFT", circleFrame, "TOPLEFT", 0, -16)
local function RefreshCircleHighlight()
local cur = choices.minimapMapStyle or "auto"
local matched = (cur == "auto")
for _, b in ipairs(circleBtns) do
if b.styleKey == cur then
b:SetBackdropBorderColor(1, 0.78, 0.2, 1)
matched = true
else
b:SetBackdropBorderColor(0.3, 0.3, 0.35, 1)
end
end
if not matched then
choices.minimapMapStyle = "auto"
end
autoStyleBtn.sfActive = ((choices.minimapMapStyle or "auto") == "auto")
autoStyleBtn:RefreshVisual()
end
autoStyleBtn:SetScript("OnClick", function()
choices.minimapMapStyle = "auto"
RefreshCircleHighlight()
PlaySound("igMainMenuOptionCheckBoxOn")
end)
for idx, style in ipairs(mapStyles) do
local sb = CreateFrame("Button", WN("CS"), circleFrame)
sb:SetWidth(CS); sb:SetHeight(CS)
sb:SetPoint("TOPLEFT", circleFrame, "TOPLEFT",
42 + (idx - 1) * (CS + CG), -16)
sb:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 8,
insets = { left = 2, right = 2, top = 2, bottom = 2 },
})
sb:SetBackdropColor(0.08, 0.08, 0.1, 0.85)
local ptex = sb:CreateTexture(nil, "ARTWORK")
ptex:SetTexture(style.tex)
ptex:SetPoint("CENTER")
ptex:SetWidth(CS - 4); ptex:SetHeight(CS - 4)
sb.styleKey = style.key
sb._sfLabel = style.label
sb:SetScript("OnClick", function()
choices.minimapMapStyle = this.styleKey
RefreshCircleHighlight()
PlaySound("igMainMenuOptionCheckBoxOn")
end)
sb:SetScript("OnEnter", function()
this:SetBackdropBorderColor(0.7, 0.7, 0.7, 1)
GameTooltip:SetOwner(this, "ANCHOR_TOP")
GameTooltip:SetText(this._sfLabel)
GameTooltip:Show()
end)
sb:SetScript("OnLeave", function()
local cur = choices.minimapMapStyle or "auto"
if this.styleKey == cur then
this:SetBackdropBorderColor(1, 0.78, 0.2, 1)
else
this:SetBackdropBorderColor(0.3, 0.3, 0.35, 1)
end
GameTooltip:Hide()
end)
table.insert(circleBtns, sb)
end
RefreshCircleHighlight()
MakeLabel(p, "地图风格:", x, y - 26, 10, 0.78, 0.72, 0.76)
MakeBtnGroup(p, x + 60, y - 24,
{ {key="auto", label="自动", w=50}, {key="round", label="圆形", w=50}, {key="square", label="方形", w=50} },
function() return choices.minimapMapStyle end,
function(v) choices.minimapMapStyle = v end)
return 54
GetMode,
function(v)
if v == "auto" then
choices.minimapMapShape = "circle"
choices.minimapMapStyle = "auto"
circleFrame:Hide()
elseif v == "round" then
choices.minimapMapShape = "circle"
if choices.minimapMapStyle == "auto" then
choices.minimapMapStyle = "map"
end
RefreshCircleHighlight()
circleFrame:Show()
elseif v == "square" then
choices.minimapMapShape = "square1"
circleFrame:Hide()
end
end)
if GetMode() == "round" then circleFrame:Show() end
return 110
end, "worldmap")
AddFeature("Buff 栏", "自定义 Buff/Debuff 显示", "buffEnabled", function(p, x, y)