mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 14:10:01 +00:00
whisperproxy: cache functions and use game locales
This commit is contained in:
@@ -36,17 +36,19 @@ pfUI:RegisterModule("whisperproxy", function ()
|
||||
end
|
||||
end
|
||||
|
||||
local proxyOK = { OKAY, function()
|
||||
pfUI.chat.whisperproxy.forwardto = this:GetParent().input:GetText()
|
||||
ToggleProxy()
|
||||
end }
|
||||
|
||||
local proxyCancel = { CANCEL, function()
|
||||
pfUI.chat.whisperproxy.forwardto = ""
|
||||
end }
|
||||
|
||||
proxy:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
proxy:SetScript("OnClick", function()
|
||||
if proxy.forwardto == "" or arg1 == "RightButton" then
|
||||
CreateQuestionDialog(T["Please enter a name of a character who should receive your whispers:"],
|
||||
function()
|
||||
pfUI.chat.whisperproxy.forwardto = this:GetParent().input:GetText()
|
||||
ToggleProxy()
|
||||
end,
|
||||
function()
|
||||
pfUI.chat.whisperproxy.forwardto = ""
|
||||
end, true)
|
||||
CreateQuestionDialog(T["Please enter a name of a character who should receive your whispers:"], proxyOK, proxyCancel, true)
|
||||
else
|
||||
ToggleProxy()
|
||||
end
|
||||
@@ -72,4 +74,4 @@ pfUI:RegisterModule("whisperproxy", function ()
|
||||
|
||||
-- attach module to the pfUI tree
|
||||
pfUI.chat.whisperproxy = proxy
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user