-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathDialogs.lua
More file actions
52 lines (48 loc) · 1.46 KB
/
Dialogs.lua
File metadata and controls
52 lines (48 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
StaticPopupDialogs["SCRB_RELOADUI"] = StaticPopupDialogs["SCRB_RELOADUI"]
or {
text = L["RELOADUI_TEXT"],
button1 = L["RELOADUI"],
button2 = L["CANCEL"],
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["SCRB_RELOADUI"].OnAccept = function()
ReloadUI()
end