ui-widgets: prevent duplicate question dialogs

This commit is contained in:
shagu
2019-03-31 14:59:20 +02:00
parent 8b39968db9
commit 4d0be42233
+4 -4
View File
@@ -579,9 +579,9 @@ end
-- accessed with "GetParent().input".
function pfUI.api.CreateQuestionDialog(text, yes, no, editbox)
-- do not allow multiple instances of question dialogs
if pfQuestionDialog and pfQuestionDialog:IsShown() then
pfQuestionDialog:Hide()
pfQuestionDialog = nil
if _G["pfQuestionDialog"] and _G["pfQuestionDialog"]:IsShown() then
_G["pfQuestionDialog"]:Hide()
_G["pfQuestionDialog"] = nil
return
end
@@ -783,4 +783,4 @@ function pfUI.api.CreateInfoBox(text, time, parent, height)
infobox:SetFrameStrata("FULLSCREEN_DIALOG")
infobox:Show()
end
end