天赋修改更直接展示预览时天赋变更信息

世界地图揭示迷雾全修复
This commit is contained in:
rucky
2026-03-23 18:13:03 +08:00
parent ec9e3c29d6
commit 40d37dc8c4
7 changed files with 1504 additions and 1348 deletions

View File

@@ -141,6 +141,49 @@ local function HideBlizzardDecorations()
WorldMapFrameTitle:Hide()
end
for _, n in ipairs({"WorldMapFrameSizeUpButton", "WorldMapFrameSizeDownButton"}) do
local f = _G[n]
if f then
f:Hide()
f:SetAlpha(0)
f:EnableMouse(false)
if f.ClearAllPoints then
f:ClearAllPoints()
f:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -9999, 9999)
end
if f.GetRegions then
local regs = { f:GetRegions() }
for _, r in ipairs(regs) do
if r and r.Hide then r:Hide() end
end
end
end
end
if WorldMapFrame.GetChildren then
local wmCh = { WorldMapFrame:GetChildren() }
for _, c in ipairs(wmCh) do
if c and not c._nanamiNuked and not c._nanamiSkinned then
local cn = c.GetName and c:GetName() or ""
if cn ~= "" and (
string.find(cn, "SizeUp") or
string.find(cn, "SizeDown") or
string.find(cn, "Resize") or
string.find(cn, "Maximize") or
string.find(cn, "Minimize")
) then
NukeFrame(c)
elseif cn == "" then
local w = c.GetWidth and c:GetWidth() or 999
local h = c.GetHeight and c:GetHeight() or 999
if w > 0 and w < 30 and h > 0 and h < 30 then
NukeFrame(c)
end
end
end
end
end
blizzHooked = true
end
@@ -377,6 +420,8 @@ local function HookTooltipShow(tip)
end
end
local RepositionWorldMapControls
--------------------------------------------------------------------------------
-- 4. Per-frame updater
--------------------------------------------------------------------------------
@@ -412,6 +457,7 @@ local function OnFrameUpdate()
UpdateTitle()
UpdateCoords()
HideBlizzardDecorations()
RepositionWorldMapControls()
end
end
@@ -425,13 +471,103 @@ local function ApplyLayout(cfg)
WorldMapFrame:SetScale(s)
WorldMapFrame:ClearAllPoints()
WorldMapFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 30)
WorldMapFrame:SetWidth(WorldMapButton:GetWidth() + 20)
WorldMapFrame:SetHeight(WorldMapButton:GetHeight() + 60)
WorldMapFrame:SetWidth(WorldMapButton:GetWidth() + 12)
WorldMapFrame:SetHeight(WorldMapButton:GetHeight() + 40)
WorldMapDetailFrame:ClearAllPoints()
WorldMapDetailFrame:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 6, -32)
WorldMapButton:ClearAllPoints()
WorldMapButton:SetPoint("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", 0, 0)
WorldMapButton:SetPoint("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 0, 0)
if BlackoutWorld then
BlackoutWorld:Hide()
end
end
local blizzLabelsKilled = false
local function KillBlizzardDropDownLabels()
if blizzLabelsKilled then return end
local _G = getfenv(0)
local targets = {
_G["WorldMapContinentDropDown"],
_G["WorldMapZoneDropDown"],
_G["WorldMapZoneMinimapDropDown"],
_G["WorldMapFrameMiniBorderLeft"],
_G["WorldMapFrameMiniBorderRight"],
WorldMapFrame,
}
local found = 0
for _, parent in ipairs(targets) do
if parent and parent.GetRegions then
local regions = { parent:GetRegions() }
for _, r in ipairs(regions) do
if r and not r._nanamiCustom and r.GetObjectType
and r:GetObjectType() == "FontString" then
local t = r.GetText and r:GetText() or ""
if t == "大陆" or t == "地区"
or t == "Continent" or t == "Zone" then
r:SetText("")
r:SetAlpha(0)
r:Hide()
r.Show = function() end
r.SetText = function() end
r.SetAlpha = function() end
found = found + 1
end
end
end
end
end
for _, n in ipairs({"WorldMapContinentDropDownLabel", "WorldMapZoneDropDownLabel", "WorldMapZoneMinimapDropDownLabel"}) do
local lbl = _G[n]
if lbl then
lbl:SetAlpha(0)
lbl:Hide()
lbl.Show = function() end
lbl.SetText = function() end
found = found + 1
end
end
if found > 0 then blizzLabelsKilled = true end
end
RepositionWorldMapControls = function()
if not skinFrame or not titleBar then return end
local _G = getfenv(0)
if not blizzLabelsKilled then KillBlizzardDropDownLabels() end
if WorldMapDetailFrame then
WorldMapDetailFrame:ClearAllPoints()
WorldMapDetailFrame:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 6, -32)
end
if WorldMapButton and WorldMapDetailFrame then
WorldMapButton:ClearAllPoints()
WorldMapButton:SetPoint("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", 0, 0)
WorldMapButton:SetPoint("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 0, 0)
end
local cDD = _G["WorldMapContinentDropDown"]
local zDD = _G["WorldMapZoneDropDown"]
local zBtn = _G["WorldMapZoomOutButton"]
if cDD then
cDD:ClearAllPoints()
cDD:SetPoint("TOPLEFT", skinFrame, "TOPLEFT", 200, -3)
end
if zDD then
zDD:ClearAllPoints()
zDD:SetPoint("LEFT", cDD, "RIGHT", 0, 0)
end
if zBtn then
zBtn:ClearAllPoints()
zBtn:SetPoint("LEFT", zDD, "RIGHT", -14, 2)
zBtn:SetWidth(48)
zBtn:SetHeight(20)
end
end
--------------------------------------------------------------------------------
-- 6. Window mode setup
--------------------------------------------------------------------------------
@@ -462,6 +598,7 @@ function WM:SetupWindowMode()
WorldMapFrame:SetFrameStrata("FULLSCREEN_DIALOG")
if BlackoutWorld then BlackoutWorld:Hide() end
HideBlizzardDecorations()
RepositionWorldMapControls()
end)
HookScript(WorldMapFrame, "OnHide", function()
@@ -521,11 +658,13 @@ function WM:SetupWindowMode()
if origMaximize then origMaximize() end
ApplyLayout(WM:GetConfig())
HideBlizzardDecorations()
RepositionWorldMapControls()
end
_G2.WorldMapFrame_Minimize = function()
if origMinimize then origMinimize() end
ApplyLayout(WM:GetConfig())
HideBlizzardDecorations()
RepositionWorldMapControls()
end
end
@@ -548,7 +687,12 @@ local function SkinDropDown(dropdownName)
bg:SetPoint("TOPLEFT", dd, "TOPLEFT", 16, -2)
bg:SetPoint("BOTTOMRIGHT", dd, "BOTTOMRIGHT", -16, 6)
bg:SetFrameLevel(dd:GetFrameLevel())
bg:SetBackdrop(PANEL_BACKDROP)
bg:SetBackdrop({
bgFile = "Interface\\Buttons\\WHITE8X8",
edgeFile = "Interface\\Buttons\\WHITE8X8",
edgeSize = 1,
insets = { left = 1, right = 1, top = 1, bottom = 1 },
})
bg:SetBackdropColor(_A.btnBg[1], _A.btnBg[2], _A.btnBg[3], _A.btnBg[4])
bg:SetBackdropBorderColor(_A.btnBorder[1], _A.btnBorder[2], _A.btnBorder[3], _A.btnBorder[4])
dd._nanamiBG = bg
@@ -561,6 +705,36 @@ local function SkinDropDown(dropdownName)
text:SetTextColor(_A.btnText[1], _A.btnText[2], _A.btnText[3])
end
local origLabel = _G[dropdownName .. "Label"]
local labelText = ""
if origLabel then
labelText = origLabel:GetText() or ""
origLabel:Hide()
origLabel:SetAlpha(0)
origLabel:SetText("")
origLabel:ClearAllPoints()
origLabel:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -9999, 9999)
origLabel.Show = function() end
origLabel.SetText = function() end
origLabel.SetPoint = function() end
origLabel.ClearAllPoints = function() end
end
if labelText == "" then
if string.find(dropdownName, "Continent") then labelText = "大陆"
elseif string.find(dropdownName, "ZoneMinimap") then labelText = ""
elseif string.find(dropdownName, "Zone") then labelText = "地区"
end
end
if labelText ~= "" then
local newLabel = bg:CreateFontString(nil, "OVERLAY")
newLabel._nanamiCustom = true
newLabel:SetFont(font, 11, "OUTLINE")
newLabel:SetTextColor(_A.dimText[1], _A.dimText[2], _A.dimText[3])
newLabel:SetPoint("RIGHT", bg, "LEFT", -4, 0)
newLabel:SetText(labelText)
dd._nanamiLabel = newLabel
end
local btn = _G[dropdownName .. "Button"]
if btn then
local nt = btn:GetNormalTexture()
@@ -624,7 +798,12 @@ local function SkinNativeButton(btnName, labelOverride)
local ht = btn.GetHighlightTexture and btn:GetHighlightTexture()
if ht then ht:SetAlpha(0) end
btn:SetBackdrop(PANEL_BACKDROP)
btn:SetBackdrop({
bgFile = "Interface\\Buttons\\WHITE8X8",
edgeFile = "Interface\\Buttons\\WHITE8X8",
edgeSize = 1,
insets = { left = 1, right = 1, top = 1, bottom = 1 },
})
btn:SetBackdropColor(_A.btnBg[1], _A.btnBg[2], _A.btnBg[3], _A.btnBg[4])
btn:SetBackdropBorderColor(_A.btnBorder[1], _A.btnBorder[2], _A.btnBorder[3], _A.btnBorder[4])
@@ -663,6 +842,7 @@ local function SkinWorldMapControls()
SkinNativeButton("WorldMapZoomOutButton", "缩小")
SkinDropDownLists()
RepositionWorldMapControls()
if not ddListHooked then
ddListHooked = true