mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-31 16:06:57 +00:00
Reuse one question dialog, backfill chat history, dim arrow icons on events
CreateQuestionDialog builds its frame once and sizes it right away from the text's unbounded width. A frame per call broke the one-dialog guard after the first dialog, since 1.12 binds a frame name only once. An onclose that opens the next question runs on the next frame. Chat history goes in with BackFillMessage, above the lines the frame already has. SkinArrowButton dims its icon from OnEnable/OnDisable instead of an OnUpdate per button.
This commit is contained in:
+3
-6
@@ -924,12 +924,9 @@ pfUI:RegisterModule("chat", function ()
|
||||
|
||||
if not _G["ChatFrame"..i].HookAddMessage then
|
||||
if C.chat.text.history == "1" then
|
||||
-- write history to chat
|
||||
local history = GetChatHistory(i)
|
||||
for j=30,0,-1 do
|
||||
if history[j] then
|
||||
_G["ChatFrame"..i]:AddMessage(history[j], .7,.7,.7)
|
||||
end
|
||||
-- write history to chat, newest first, above the lines already there
|
||||
for _, msg in ipairs(GetChatHistory(i)) do
|
||||
_G["ChatFrame"..i]:BackFillMessage(msg, .7,.7,.7)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user