完成多出修改
修复拾取界面点击无效问题 修复宠物训练界面不显示训练点问题 新增天赋分享到聊天界面 修复飞行界面无法关闭问题 修复术士宠物的显示问题 为天赋界面添加默认数据库支持 框架现在也可自主选择是否启用 玩家框架和目标框架可取消显示3D头像以及透明度修改 背包和银行也添加透明度自定义支持 优化tooltip性能和背包物品显示方式 修复布局模式在ui缩放后不能正常定位的问题 添加硬核模式危险和死亡的工会通报 添加拾取和已拾取的框体 等等
This commit is contained in:
104
SocialUI.lua
104
SocialUI.lua
@@ -516,12 +516,24 @@ local origFriendsFrameShow
|
||||
local function HideBlizzardFriends()
|
||||
if not FriendsFrame then return end
|
||||
origFriendsFrameShow = FriendsFrame.Show
|
||||
FriendsFrame:Hide()
|
||||
FriendsFrame:SetAlpha(0)
|
||||
FriendsFrame:EnableMouse(false)
|
||||
FriendsFrame:ClearAllPoints()
|
||||
FriendsFrame:SetPoint("TOPLEFT", UIParent, "BOTTOMRIGHT", 2000, 2000)
|
||||
FriendsFrame:UnregisterAllEvents()
|
||||
FriendsFrame.Show = function() end
|
||||
|
||||
if UIPanelWindows then
|
||||
UIPanelWindows["FriendsFrame"] = nil
|
||||
end
|
||||
|
||||
for i = table.getn(UISpecialFrames), 1, -1 do
|
||||
if UISpecialFrames[i] == "FriendsFrame" then
|
||||
table.remove(UISpecialFrames, i)
|
||||
end
|
||||
end
|
||||
|
||||
if SetWhoToUI then
|
||||
local origSetWhoToUI = SetWhoToUI
|
||||
SetWhoToUI = function(flag)
|
||||
@@ -1248,8 +1260,82 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
-- Tab 3: Guild
|
||||
--------------------------------------------------------------------------------
|
||||
local motdPopup = nil
|
||||
local function ShowMotdPopup(motdStr)
|
||||
if not motdPopup then
|
||||
local f = CreateFrame("Frame", "SFramesSocialMotdPopup", UIParent)
|
||||
f:SetWidth(360)
|
||||
f:SetHeight(220)
|
||||
f:SetPoint("CENTER", UIParent, "CENTER", 0, 60)
|
||||
f:SetFrameStrata("DIALOG")
|
||||
f:SetFrameLevel(120)
|
||||
SetRoundBackdrop(f, T.panelBg, T.panelBorder)
|
||||
CreateShadow(f)
|
||||
f:EnableMouse(true)
|
||||
f:SetMovable(true)
|
||||
f:RegisterForDrag("LeftButton")
|
||||
f:SetScript("OnDragStart", function() this:StartMoving() end)
|
||||
f:SetScript("OnDragStop", function() this:StopMovingOrSizing() end)
|
||||
|
||||
local titleFS = MakeFS(f, 12, "CENTER", T.gold)
|
||||
titleFS:SetPoint("TOP", f, "TOP", 0, -10)
|
||||
titleFS:SetText("公会公告")
|
||||
f.titleFS = titleFS
|
||||
|
||||
MakeSep(f, -26)
|
||||
|
||||
local scrollFrame = CreateFrame("ScrollFrame", NextName("MotdScroll"), f)
|
||||
scrollFrame:SetPoint("TOPLEFT", f, "TOPLEFT", 12, -30)
|
||||
scrollFrame:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -12, 40)
|
||||
|
||||
local child = CreateFrame("Frame", nil, scrollFrame)
|
||||
child:SetWidth(336 - 24)
|
||||
child:SetHeight(1)
|
||||
scrollFrame:SetScrollChild(child)
|
||||
|
||||
local bodyFS = child:CreateFontString(nil, "OVERLAY")
|
||||
bodyFS:SetFont(GetFont(), 11, "OUTLINE")
|
||||
bodyFS:SetJustifyH("LEFT")
|
||||
bodyFS:SetTextColor(T.bodyText[1], T.bodyText[2], T.bodyText[3])
|
||||
bodyFS:SetPoint("TOPLEFT", child, "TOPLEFT", 0, 0)
|
||||
bodyFS:SetWidth(336 - 24)
|
||||
f.bodyFS = bodyFS
|
||||
|
||||
local scrollOffset = 0
|
||||
local scrollMax = 0
|
||||
|
||||
f.UpdateScroll = function()
|
||||
local textH = bodyFS:GetHeight() or 0
|
||||
local viewH = scrollFrame:GetHeight() or 1
|
||||
scrollMax = math.max(0, textH - viewH)
|
||||
if scrollOffset > scrollMax then scrollOffset = scrollMax end
|
||||
scrollFrame:SetVerticalScroll(scrollOffset)
|
||||
child:SetHeight(math.max(textH, viewH))
|
||||
end
|
||||
|
||||
scrollFrame:EnableMouseWheel(true)
|
||||
scrollFrame:SetScript("OnMouseWheel", function()
|
||||
scrollOffset = scrollOffset - (arg1 or 0) * 18
|
||||
if scrollOffset < 0 then scrollOffset = 0 end
|
||||
if scrollOffset > scrollMax then scrollOffset = scrollMax end
|
||||
scrollFrame:SetVerticalScroll(scrollOffset)
|
||||
end)
|
||||
|
||||
local closeBtn = MakeButton(f, "关闭", 100, 24)
|
||||
closeBtn:SetPoint("BOTTOM", f, "BOTTOM", 0, 10)
|
||||
closeBtn:SetScript("OnClick", function() f:Hide() end)
|
||||
|
||||
f:Hide()
|
||||
motdPopup = f
|
||||
end
|
||||
|
||||
motdPopup.bodyFS:SetText(motdStr or "无公告")
|
||||
motdPopup:Show()
|
||||
motdPopup.UpdateScroll()
|
||||
end
|
||||
|
||||
local function BuildGuildPage(page)
|
||||
local motdFrame = CreateFrame("Frame", nil, page)
|
||||
local motdFrame = CreateFrame("Button", NextName("MotdBtn"), page)
|
||||
motdFrame:SetHeight(36)
|
||||
motdFrame:SetPoint("TOPLEFT", page, "TOPLEFT", 0, 0)
|
||||
motdFrame:SetPoint("TOPRIGHT", page, "TOPRIGHT", 0, 0)
|
||||
@@ -1257,13 +1343,24 @@ local function BuildGuildPage(page)
|
||||
|
||||
local motdLabel = MakeFS(motdFrame, 9, "LEFT", T.dimText)
|
||||
motdLabel:SetPoint("TOPLEFT", motdFrame, "TOPLEFT", 6, -2)
|
||||
motdLabel:SetText("公会公告:")
|
||||
motdLabel:SetText("公会公告: (点击查看完整)")
|
||||
|
||||
local motdText = MakeFS(motdFrame, 10, "LEFT", T.bodyText)
|
||||
motdText:SetPoint("TOPLEFT", motdLabel, "BOTTOMLEFT", 0, -2)
|
||||
motdText:SetPoint("RIGHT", motdFrame, "RIGHT", -6, 0)
|
||||
page.motdText = motdText
|
||||
|
||||
motdFrame:SetScript("OnClick", function()
|
||||
local motd = GetGuildRosterMOTD and GetGuildRosterMOTD() or ""
|
||||
ShowMotdPopup(motd ~= "" and motd or "无公告")
|
||||
end)
|
||||
motdFrame:SetScript("OnEnter", function()
|
||||
SetPixelBackdrop(this, { 0.12, 0.06, 0.09, 0.9 }, T.tabActiveBorder)
|
||||
end)
|
||||
motdFrame:SetScript("OnLeave", function()
|
||||
SetPixelBackdrop(this, { 0.08, 0.04, 0.06, 0.8 }, T.slotBorder)
|
||||
end)
|
||||
|
||||
-- Toolbar row: search + filter buttons
|
||||
local toolBar = CreateFrame("Frame", nil, page)
|
||||
toolBar:SetHeight(18)
|
||||
@@ -2459,6 +2556,9 @@ function SUI:Initialize()
|
||||
local wasPending = whoQueryPending
|
||||
whoQueryPending = false
|
||||
if SetWhoToUI then SetWhoToUI(1) end
|
||||
if FriendsFrame and FriendsFrame:IsShown() then
|
||||
FriendsFrame:Hide()
|
||||
end
|
||||
if MainFrame and MainFrame:IsShown() and currentMainTab == 2 then
|
||||
WhoDebug("更新列表显示")
|
||||
SUI:UpdateWhoList()
|
||||
|
||||
Reference in New Issue
Block a user