-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDialogs.lua
158 lines (135 loc) · 4.04 KB
/
Dialogs.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
--[==[
Copyright ©2020 Samuel Thomas Pain
The contents of this addon, excluding third-party resources, are
copyrighted to their authors with all rights reserved.
This addon is free to use and the authors hereby grants you the following rights:
1. You may make modifications to this addon for private use only, you
may not publicize any portion of this addon.
2. Do not modify the name of this addon, including the addon folders.
3. This copyright notice shall be included in all copies or substantial
portions of the Software.
All rights not explicitly addressed in this license are reserved by
the copyright holders.
]==]--
local addonName, addon = ...
local Database = addon.Database;
local L = addon.Locales
StaticPopupDialogs['Reload'] = {
text = 'Settings have changed and a UI reload is required!',
button1 = 'Reload UI',
--button2 = 'Cancel',
OnAccept = function(self)
ReloadUI()
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs['GuildbookReport'] = {
text = 'Oops, something went wrong, is it Tuesday?\n\n%s',
button1 = "OK",
--button2 = 'Cancel',
OnAccept = function(self)
end,
OnShow = function(self)
self.editBox:SetText("https://discord.gg/st5uDAX5Cn")
end,
hasEditBox = true,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs['GuildbookDeleteGeneric'] = {
text = 'Delete %s',
button1 = YES,
button2 = NO,
OnAccept = function(self, data)
if data.callback then
data.callback()
end
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs['GuildbookDeleteCharacter'] = {
text = 'Delete %s',
button1 = YES,
button2 = NO,
OnAccept = function(self, data)
Database:DeleteCharacter(data)
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs['GuildbookReminder'] = {
text = '%s',
button1 = "OK",
button2 = "Ignore",
button3 = "Default",
OnAccept = function()
GuildbookUI:SelectView("Settings")
end,
OnCancel = function(self, data)
end,
OnAlt = function(self, data)
data.character:SetMainSpec("primary", 1)
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs['GuildbookUpdated'] = {
text = "WARNING !!!\n\n|cffC41F3BGuildbook has changed and if you proceed with this update you will lose all current data|r.\n\nGuildbook 6.0 is a rework of an older version that was updated for classic era, it is NOT compatabile with the current wrath version\n\nBUT\n\nit does include missing recipes and will have th best chance of getting any updates.\n\nDo you want to continue...",
button1 = YES,
button2 = NO,
OnAccept = function(self, data)
--GUILDBOOK_GLOBAL = nil
print('Well thats it, all data has been exterminated! Fingers crossed this thing boots up.....')
C_Timer.After(math.random(3,9), function()
Database:Init(true)
end)
end,
OnCancel = function(self)
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs['GuildbookCalendarAddEvent'] = {
text = "%s.",
button1 = YES,
button2 = NO,
OnAccept = function(self, data)
local str = self.editBox:GetText()
if str and (#str > 0) and (str ~= " ") then
local event = {
calendarTypeEnum = data.calendarTypeEnum,
text = str,
timestamp = data.timestamp
}
Database:InsertCalendarEvent(event)
end
end,
OnCancel = function(self)
end,
timeout = 0,
hasEditBox = true,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}