whisperproxy: cache functions and use game locales

This commit is contained in:
shagu
2019-03-31 14:59:21 +02:00
parent 051fec509c
commit 4c06db7081
+11 -9
View File
@@ -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)