forked from Snsei987/SenseiClassResourceBar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogs.lua
More file actions
38 lines (35 loc) · 1.09 KB
/
Dialogs.lua
File metadata and controls
38 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local _, addonTable = ...
local L = addonTable.L
StaticPopupDialogs["SCRB_EXPORT_SETTINGS"] = StaticPopupDialogs["SCRB_EXPORT_SETTINGS"]
or {
text = L["EXPORT"],
button1 = L["CLOSE"],
hasEditBox = true,
editBoxWidth = 320,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["SCRB_IMPORT_SETTINGS"] = StaticPopupDialogs["SCRB_IMPORT_SETTINGS"]
or {
text = L["IMPORT"],
button1 = L["OKAY"],
button2 = L["CANCEL"],
hasEditBox = true,
editBoxWidth = 320,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["SCRB_IMPORT_SETTINGS"].OnShow = function(self)
self:SetFrameStrata("TOOLTIP")
local editBox = self.editBox or self:GetEditBox()
editBox:SetText("")
editBox:SetFocus()
end
StaticPopupDialogs["SCRB_IMPORT_SETTINGS"].EditBoxOnEnterPressed = function(editBox)
local parent = editBox:GetParent()
if parent and parent.button1 then parent.button1:Click() end
end