mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 20:20:01 +00:00
ui-widgets: prevent duplicate question dialogs
This commit is contained in:
+4
-4
@@ -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
|
||||
Reference in New Issue
Block a user