-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDialog.lua
45 lines (42 loc) · 1.34 KB
/
Dialog.lua
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
local _, addon = ...
local L = addon.L
StaticPopupDialogs['ASTRAL_KEYS_REFRESH_CONFIRM_DIALOG'] = {
text = L["Are you sure you want to refresh all key data?"],
button1 = L["Yes"],
button2 = L["No"],
OnAccept = function(self, data, data2)
local refresh = addon.RefreshData()
if refresh then
addon.UpdateFrames()
StaticPopup_Show('ASTRAL_KEYS_REFRESH_SUCCESS_DIALOG')
else
StaticPopup_Show('ASTRAL_KEYS_REFRESH_FAILURE_DIALOG')
end
end,
OnCancel = function()
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3, -- avoid some UI taint, see http://www.wowace.com/announcements/how-to-avoid-some-ui-taint/
}
StaticPopupDialogs['ASTRAL_KEYS_REFRESH_SUCCESS_DIALOG'] = {
text = L["Refreshed key data."],
button1 = "Ok",
OnAccept = function()
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3, -- avoid some UI taint, see http://www.wowace.com/announcements/how-to-avoid-some-ui-taint/
}
StaticPopupDialogs['ASTRAL_KEYS_REFRESH_FAILURE_DIALOG'] = {
text = L["You need to wait more than 30 seconds before refreshing again."],
button1 = "Ok",
OnAccept = function()
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3, -- avoid some UI taint, see http://www.wowace.com/announcements/how-to-avoid-some-ui-taint/
}