-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogs.lua
More file actions
110 lines (95 loc) · 2.7 KB
/
Dialogs.lua
File metadata and controls
110 lines (95 loc) · 2.7 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
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
local addonName, addon = ...;
local locale = GetLocale()
local L = addon.locales[locale];
local Database = addon.db;
StaticPopupDialogs["ClassicEraCensusMergeConfirm"] = {
text = L.POPUP_MERGE_CENSUS,
button1 = YES,
button2 = NO,
OnShow = function(self)
self.button1:Disable()
self.editBox:SetText("Enter merge name")
end,
OnAccept = function(self, censusGroup)
Database:CreateMerge(censusGroup, self.editBox:GetText())
end,
OnCancel = function(self)
end,
EditBoxOnTextChanged = function (self, data)
if (self:GetText() == "") or (self:GetText():find(" ")) then
self:GetParent().button1:Disable()
else
self:GetParent().button1:Enable()
end
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
hasEditBox = true,
}
StaticPopupDialogs["ClassicEraCensusDeleteConfirm"] = {
text = "Do you want to delete these census records?",
button1 = YES,
button2 = NO,
OnAccept = function(self, censusGroup)
Database:DeleteCensus(censusGroup)
end,
OnCancel = function(self)
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs["ClassicEraCensusAcceptCoopCensusRequest"] = {
text = "Accept co-op census request?",
button1 = YES,
button2 = NO,
OnAccept = function(self, censusRequest)
addon:TriggerEvent("Census_OnCoopCensusRequestAccepted", censusRequest)
end,
OnCancel = function(self)
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
StaticPopupDialogs["ClassicEraCensusAcceptCoopCensusRecord"] = {
text = "Accept co-op census request?",
button1 = YES,
button2 = NO,
OnAccept = function(self, censusRequest)
addon:TriggerEvent("Census_OnCoopCensusRecordAccepted", censusRequest)
end,
OnCancel = function(self)
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
showAlert = 1,
}
-- StaticPopupDialogs["VendorMateDialogVendorItemsConfirm"] = {
-- text = string.format("%s %s %s\n\n%s\n\n%s", TRANSMOG_SOURCE_3, "%s", FILTERS, "%s", L.DIALOG_VENDOR_CONFIRM),
-- button1 = YES,
-- button2 = NO,
-- button3 = CANCEL,
-- OnAccept = function(self, items)
-- vendorItems(items, true)
-- end,
-- OnAlt = function(self, items)
-- end,
-- OnCancel = function(self, items)
-- vendorItems(items, false)
-- end,
-- timeout = 0,
-- whileDead = true,
-- hideOnEscape = false,
-- preferredIndex = 3,
-- showAlert = 1,
-- }