Files
pfUI/skins/blizzard/survey.lua
T
Brues 3fe072c594 Route hooksecurefunc callers through pfUI.hooksecurefunc; global belongs to ClassicAPI
pfUI's Lua hooksecurefunc lived in pfUI.env and shadowed ClassicAPI's C
global for all pfUI code. Replace it with a thin pfUI.hooksecurefunc shim
that keeps the missing-target no-op our call sites rely on (ClassicAPI
errors on a nil target) and delegates the actual hook to _G.hooksecurefunc.

Migrated all 70 internal call sites (modules/libs/skins) to
pfUI.hooksecurefunc; bare hooksecurefunc now resolves to ClassicAPI's C
version everywhere. Dropped the unused prepend path and the orphaned
pfUI.hooks table.
2026-07-05 14:58:26 -05:00

40 lines
1.5 KiB
Lua

pfUI:RegisterSkin("GM Survey", function ()
HookAddonOrVariable("Blizzard_GMSurveyUI", function()
StripTextures(GMSurveyFrame)
CreateBackdrop(GMSurveyFrame, nil, nil, .75)
CreateBackdropShadow(GMSurveyFrame)
GMSurveyFrame.backdrop:SetPoint("TOPLEFT", 10, 0)
GMSurveyFrame.backdrop:SetPoint("BOTTOMRIGHT", -72, 40)
GMSurveyFrame:SetHitRectInsets(10,72,0,40)
EnableMovable(GMSurveyFrame)
SkinCloseButton(GMSurveyCloseButton, GMSurveyFrame.backdrop, -6, -6)
StripTextures(GMSurveyHeader)
GMSurveyHeaderText:ClearAllPoints()
GMSurveyHeaderText:SetPoint("TOP", GMSurveyFrame.backdrop, "TOP", 0, -10)
local answer_header = GetNoNameObject(GMSurveyFrame, "FontString", "BACKGROUND", GMSURVEY_REQUEST_TEXT)
answer_header:ClearAllPoints()
answer_header:SetPoint("TOP", GMSurveyFrame.backdrop, "TOP", 0, -35)
for i = 1, 5 do
StripTextures(_G["GMSurveyQuestion"..i])
end
SkinButton(GMSurveySubmitButton)
GMSurveySubmitButton:ClearAllPoints()
GMSurveySubmitButton:SetPoint("BOTTOMRIGHT", GMSurveyFrame.backdrop, "BOTTOMRIGHT", -10, 10)
SkinButton(GMSurveyCancelButton)
GMSurveyCancelButton:ClearAllPoints()
GMSurveyCancelButton:SetPoint("BOTTOMLEFT", GMSurveyFrame.backdrop, "BOTTOMLEFT", 10, 10)
CreateBackdrop(GMSurveyCommentFrame, nil, true, .75)
SkinScrollbar(GMSurveyCommentScrollFrameScrollBar)
GMSurveyFrameComment:SetMaxLetters(2000)
pfUI.hooksecurefunc("GMSurveyFrame_Update", function()
GMSurveyFrameComment:SetWidth(505)
end)
end)
end)