Skip to content

Commit

Permalink
标记为6.10.2版本
Browse files Browse the repository at this point in the history
  • Loading branch information
siweia committed Apr 28, 2021
1 parent b7ec2e9 commit 7586368
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 54 deletions.
16 changes: 8 additions & 8 deletions Interface/AddOns/NDui/Modules/Misc/QuickJoin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ local M = B:GetModule("Misc")
]]
local select, wipe, sort = select, wipe, sort
local UnitClass, UnitGroupRolesAssigned = UnitClass, UnitGroupRolesAssigned
local HideUIPanel = HideUIPanel
local StaticPopup_Hide, HideUIPanel = StaticPopup_Hide, HideUIPanel
local C_Timer_After = C_Timer.After
local C_LFGList_GetSearchResultMemberInfo = C_LFGList.GetSearchResultMemberInfo
local LFG_LIST_GROUP_DATA_ATLASES = LFG_LIST_GROUP_DATA_ATLASES
local ApplicationViewerFrame = _G.LFGListFrame.ApplicationViewer
local LFG_LIST_GROUP_DATA_ATLASES = _G.LFG_LIST_GROUP_DATA_ATLASES

function M:HookApplicationClick()
if LFGListFrame.SearchPanel.SignUpButton:IsEnabled() then
Expand Down Expand Up @@ -70,10 +71,10 @@ local function GetPartyMemberInfo(index)
return role, class
end

local function GetCorrectRoleInfo(resultID, i)
if resultID then
return C_LFGList_GetSearchResultMemberInfo(resultID, i)
else
local function GetCorrectRoleInfo(frame, i)
if frame.resultID then
return C_LFGList_GetSearchResultMemberInfo(frame.resultID, i)
elseif frame == ApplicationViewerFrame then
return GetPartyMemberInfo(i)
end
end
Expand All @@ -84,11 +85,10 @@ local function UpdateGroupRoles(self)
if not self.__owner then
self.__owner = self:GetParent():GetParent()
end
local resultID = self.__owner.resultID

local count = 0
for i = 1, 5 do
local role, class = GetCorrectRoleInfo(resultID, i)
local role, class = GetCorrectRoleInfo(self.__owner, i)
local roleIndex = role and roleOrder[role]
if roleIndex then
count = count + 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ local function reskinChatBubble(chatbubble)

frame:DisableDrawLayer("BORDER")
frame.Tail:SetAlpha(0)
frame.String:SetFont(DB.Font[1], 13, DB.Font[3])
end

chatbubble.styled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ tinsert(C.defaultThemes, function()
end
end)

hooksecurefunc("LFGListGroupDataDisplayPlayerCount_Update", function(self)
if not self.styled then
self.Count:SetWidth(24)

self.styled = true
end
end)

-- Activity finder

local ActivityFinder = EntryCreation.ActivityFinder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,18 @@ tinsert(C.defaultThemes, function()
if widgetFrame.Frame then widgetFrame.Frame:SetAlpha(0) end

local bar = widgetFrame.TimerBar
if bar and not bar.styled then
if bar and not bar.bg then
B:SmoothBar(bar)
B.CreateBDFrame(bar, .25)
hooksecurefunc(bar, "SetStatusBarAtlas", B.ReplaceWidgetBarTexture)
bar.bg = B.CreateBDFrame(bar, .25)
end

bar.styled = true
if widgetFrame.CurrencyContainer then
for currencyFrame in widgetFrame.currencyPool:EnumerateActive() do
if not currencyFrame.bg then
currencyFrame.bg = B.ReskinIcon(currencyFrame.Icon)
end
end
end
end
end
Expand Down
100 changes: 59 additions & 41 deletions Interface/AddOns/NDui/Modules/Skins/Blizzard/FrameXML/WidgetFrame.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
local _, ns = ...
local B, C, L, DB = unpack(ns)

-- Credit: ShestakUI
local Type_StatusBar = _G.Enum.UIWidgetVisualizationType.StatusBar
local Type_CaptureBar = _G.Enum.UIWidgetVisualizationType.CaptureBar
local Type_SpellDisplay = _G.Enum.UIWidgetVisualizationType.SpellDisplay
local Type_DoubleStatusBar = _G.Enum.UIWidgetVisualizationType.DoubleStatusBar

local atlasColors = {
["UI-Frame-Bar-Fill-Blue"] = {.2, .6, 1},
["UI-Frame-Bar-Fill-Red"] = {.9, .2, .2},
Expand Down Expand Up @@ -37,34 +41,67 @@ local function ReskinWidgetStatusBar(bar)
end
end

local Type_StatusBar = _G.Enum.UIWidgetVisualizationType.StatusBar
local Type_SpellDisplay = _G.Enum.UIWidgetVisualizationType.SpellDisplay
local Type_DoubleStatusBar = _G.Enum.UIWidgetVisualizationType.DoubleStatusBar
local function ReskinDoubleStatusBarWidget(self)
if not self.styled then
ReskinWidgetStatusBar(self.LeftBar)
ReskinWidgetStatusBar(self.RightBar)

self.styled = true
end
end

local function ReskinCaptureBarWidget(self)
self.LeftBar:SetTexture(DB.normTex)
self.NeutralBar:SetTexture(DB.normTex)
self.RightBar:SetTexture(DB.normTex)

self.LeftBar:SetVertexColor(.2, .6, 1)
self.NeutralBar:SetVertexColor(.8, .8, .8)
self.RightBar:SetVertexColor(.9, .2, .2)

if not self.bg then
self.LeftLine:SetAlpha(0)
self.RightLine:SetAlpha(0)
self.BarBackground:SetAlpha(0)
self.Glow1:SetAlpha(0)
self.Glow2:SetAlpha(0)
self.Glow3:SetAlpha(0)

self.bg = B.SetBD(self)
self.bg:SetPoint("TOPLEFT", self.LeftBar, -2, 2)
self.bg:SetPoint("BOTTOMRIGHT", self.RightBar, 2, -2)
end
end

local function ReskinSpellDisplayWidget(self)
if not self.styled then
local widgetSpell = self.Spell
widgetSpell.IconMask:Hide()
widgetSpell.Border:SetTexture(nil)
widgetSpell.DebuffBorder:SetTexture(nil)
B.ReskinIcon(widgetSpell.Icon)

self.styled = true
end
end

local function ReskinWidgetFrames()
for _, widgetFrame in pairs(_G.UIWidgetTopCenterContainerFrame.widgetFrames) do
local widgetType = widgetFrame.widgetType
if widgetType == Type_DoubleStatusBar then
if not widgetFrame.styled then
ReskinWidgetStatusBar(widgetFrame.LeftBar)
ReskinWidgetStatusBar(widgetFrame.RightBar)

widgetFrame.styled = true
end
ReskinDoubleStatusBarWidget(widgetFrame)
elseif widgetType == Type_SpellDisplay then
if not widgetFrame.styled then
local widgetSpell = widgetFrame.Spell
widgetSpell.IconMask:Hide()
widgetSpell.Border:SetTexture(nil)
widgetSpell.DebuffBorder:SetTexture(nil)
B.ReskinIcon(widgetSpell.Icon)

widgetFrame.styled = true
end
ReskinSpellDisplayWidget(widgetFrame)
elseif widgetType == Type_StatusBar then
ReskinWidgetStatusBar(widgetFrame.Bar)
end
end

for _, widgetFrame in pairs(_G.UIWidgetBelowMinimapContainerFrame.widgetFrames) do
if widgetFrame.widgetType == Type_CaptureBar then
ReskinCaptureBarWidget(widgetFrame)
end
end
end

tinsert(C.defaultThemes, function()
Expand All @@ -77,26 +114,7 @@ tinsert(C.defaultThemes, function()
ReskinWidgetStatusBar(self.Bar)
end)

hooksecurefunc(_G.UIWidgetTemplateCaptureBarMixin, "Setup", function(self)
self.LeftLine:SetAlpha(0)
self.RightLine:SetAlpha(0)
self.BarBackground:SetAlpha(0)
self.Glow1:SetAlpha(0)
self.Glow2:SetAlpha(0)
self.Glow3:SetAlpha(0)

self.LeftBar:SetTexture(DB.normTex)
self.NeutralBar:SetTexture(DB.normTex)
self.RightBar:SetTexture(DB.normTex)

self.LeftBar:SetVertexColor(.2, .6, 1)
self.NeutralBar:SetVertexColor(.8, .8, .8)
self.RightBar:SetVertexColor(.9, .2, .2)

if not self.bg then
self.bg = B.SetBD(self)
self.bg:SetPoint("TOPLEFT", self.LeftBar, -2, 2)
self.bg:SetPoint("BOTTOMRIGHT", self.RightBar, 2, -2)
end
end)
hooksecurefunc(_G.UIWidgetTemplateCaptureBarMixin, "Setup", ReskinCaptureBarWidget)
hooksecurefunc(_G.UIWidgetTemplateSpellDisplayMixin, "Setup", ReskinSpellDisplayWidget)
hooksecurefunc(_G.UIWidgetTemplateDoubleStatusBarMixin, "Setup", ReskinDoubleStatusBarWidget)
end)
2 changes: 1 addition & 1 deletion Interface/AddOns/NDui/NDui.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## X-Credits: Elv, Freebaser, Haleth, Haste, Leatrix, lightspark, Loshine, Neavo, p3lim, Paopao001, Qulight, Ray, Rubgrsch, Simpy, Tuller, zork.
## Author: Siweia
## Notes: More than a UI.
## Version: 6.10.1
## Version: 6.10.2
## X-Support: SL
## X-Website: https://github.com/siweia/NDui
## SavedVariables: NDuiADB, NDuiPDB
Expand Down

0 comments on commit 7586368

Please sign in to comment.