Use ClassicAPI's nop for empty functions

This commit is contained in:
Brues
2026-10-30 12:20:37 -05:00
parent 436c6d6dd4
commit b0f9b7b993
6 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ pfUI:RegisterModule("addoncompat", function ()
{T["Yes"], function()
ReloadUI()
end},
{T["No"], function() end},
{T["No"], nop},
nil)
end
end
+1 -1
View File
@@ -761,7 +761,7 @@ pfUI:RegisterModule("gui", function ()
local defval = "["..T["Search"].."]"
-- initialize search window
CreateGUIEntry(defval, nil, function() end)
CreateGUIEntry(defval, nil, nop)
pfUI.gui.frames[defval]:Click()
local scroll = pfUI.gui.frames[defval].area.scroll.content
+10 -10
View File
@@ -20,8 +20,8 @@ pfUI:RegisterSkin("Help", function ()
-- HelpFrameHome
StripTextures(HelpFrameHomeIssues)
SkinButton(HelpFrameHomeIssues)
HelpFrameHomeIssues:SetScript("OnMouseUp", function() end)
HelpFrameHomeIssues:SetScript("OnMouseDown", function() end)
HelpFrameHomeIssues:SetScript("OnMouseUp", nop)
HelpFrameHomeIssues:SetScript("OnMouseDown", nop)
SkinButton(HelpFrameHomeCancel)
@@ -49,13 +49,13 @@ pfUI:RegisterSkin("Help", function ()
-- HelpFrameGeneral
StripTextures(HelpFrameGeneralButton)
SkinButton(HelpFrameGeneralButton)
HelpFrameGeneralButton:SetScript("OnMouseUp", function() end)
HelpFrameGeneralButton:SetScript("OnMouseDown", function() end)
HelpFrameGeneralButton:SetScript("OnMouseUp", nop)
HelpFrameGeneralButton:SetScript("OnMouseDown", nop)
StripTextures(HelpFrameGeneralButton2)
SkinButton(HelpFrameGeneralButton2)
HelpFrameGeneralButton2:SetScript("OnMouseUp", function() end)
HelpFrameGeneralButton2:SetScript("OnMouseDown", function() end)
HelpFrameGeneralButton2:SetScript("OnMouseUp", nop)
HelpFrameGeneralButton2:SetScript("OnMouseDown", nop)
SkinButton(HelpFrameGeneralCancel)
@@ -69,13 +69,13 @@ pfUI:RegisterSkin("Help", function ()
StripTextures(HelpFrameVerbalHarassmentButton)
SkinButton(HelpFrameVerbalHarassmentButton)
HelpFrameVerbalHarassmentButton:SetScript("OnMouseUp", function() end)
HelpFrameVerbalHarassmentButton:SetScript("OnMouseDown", function() end)
HelpFrameVerbalHarassmentButton:SetScript("OnMouseUp", nop)
HelpFrameVerbalHarassmentButton:SetScript("OnMouseDown", nop)
StripTextures(HelpFramePhysicalHarassmentButton)
SkinButton(HelpFramePhysicalHarassmentButton)
HelpFramePhysicalHarassmentButton:SetScript("OnMouseUp", function() end)
HelpFramePhysicalHarassmentButton:SetScript("OnMouseDown", function() end)
HelpFramePhysicalHarassmentButton:SetScript("OnMouseUp", nop)
HelpFramePhysicalHarassmentButton:SetScript("OnMouseDown", nop)
SkinButton(HelpFrameHarassmentCancel)
+2 -2
View File
@@ -76,8 +76,8 @@ pfUI:RegisterSkin("Books", function ()
ItemTextScrollFrameScrollBarScrollUpButton:Show()
ItemTextScrollFrameScrollBarScrollDownButton:Show()
ItemTextScrollFrame.Show = function(self) end
ItemTextScrollFrame.Hide = function(self) end
ItemTextScrollFrame.Show = nop
ItemTextScrollFrame.Hide = nop
ItemTextScrollFrameScrollBar.Show = function(self) self.thumb:Show() end
ItemTextScrollFrameScrollBar.Hide = function(self) self.thumb:Hide() end
ItemTextScrollFrameScrollBarScrollUpButton.Show = function(self) if self:GetParent():GetValue() ~= 0 then self:Enable() end end
+2 -2
View File
@@ -34,8 +34,8 @@ pfUI:RegisterSkin("KeyBindings", function ()
local button = _G["KeyBindingFrameBinding"..key.."Key"..btn.."Button"]
StripTextures(button)
SkinButton(button)
button:SetScript("OnMouseDown", function() end)
button:SetScript("OnMouseUp", function() end)
button:SetScript("OnMouseDown", nop)
button:SetScript("OnMouseUp", nop)
end
end
end)
+1 -1
View File
@@ -23,7 +23,7 @@ pfUI:RegisterSkin("Options - Interface", function ()
SkinCollapseButton(toggle)
toggle:SetPushedTexture("")
toggle:SetHighlightTexture("")
toggle.SetPushedTexture = function() end
toggle.SetPushedTexture = nop
end
-- ClassicAPI's own pages (Options\Panel.lua) number their controls