-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathEllesmereUI_FirstInstall.lua
More file actions
514 lines (461 loc) · 20.8 KB
/
EllesmereUI_FirstInstall.lua
File metadata and controls
514 lines (461 loc) · 20.8 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
-------------------------------------------------------------------------------
-- EllesmereUI_FirstInstall.lua
--
-- One-time popup on first install that lets the user pick which EUI addons
-- to keep enabled. Visual style mirrors the Spec Assign popup (dimmer +
-- dark panel + white border + Check All / Uncheck All links + Done button).
--
-- Layout: three columns (Core / QoL / UI Reskin), one checkbox per row,
-- groups build down independently.
--
-- Fires at PLAYER_LOGIN, BEFORE the conflict-check popup (see EllesmereUI.lua
-- which now gates its conflict check on EllesmereUIDB.firstInstallPopupShown).
-------------------------------------------------------------------------------
local EllesmereUI = _G.EllesmereUI
if not EllesmereUI then return end
local PP = EllesmereUI.PanelPP
local MakeBorder = EllesmereUI.MakeBorder
local ELLESMERE_GREEN = EllesmereUI.ELLESMERE_GREEN
local BORDER_R = EllesmereUI.BORDER_R or 1
local BORDER_G = EllesmereUI.BORDER_G or 1
local BORDER_B = EllesmereUI.BORDER_B or 1
local CB_BOX_R = EllesmereUI.CB_BOX_R or 0.075
local CB_BOX_G = EllesmereUI.CB_BOX_G or 0.113
local CB_BOX_B = EllesmereUI.CB_BOX_B or 0.141
local CB_BRD_A = EllesmereUI.CB_BRD_A or 0.25
local CB_ACT_BRD_A = EllesmereUI.CB_ACT_BRD_A or 0.85
-- Groups: { header, { entries } } where each entry is { label = "...", addon = "..." (folder) }
-- If addon is nil the checkbox is informational / disabled (e.g. Cursor Circle, Bags).
local GROUPS = {
{
header = "Core Addons",
entries = {
{ label = "Action Bars", addon = "EllesmereUIActionBars" },
{ label = "Nameplates", addon = "EllesmereUINameplates" },
{ label = "Unit Frames", addon = "EllesmereUIUnitFrames" },
{ label = "Cooldown Manager", addon = "EllesmereUICooldownManager" },
{ label = "Resource Bars", addon = "EllesmereUIResourceBars" },
{ label = "Raid Frames", comingSoon = true },
},
},
{
header = "QoL Addons",
entries = {
{ label = "Quality of Life", addon = "EllesmereUIQoL" },
{ label = "AuraBuff Reminders", addon = "EllesmereUIAuraBuffReminders" },
-- Cursor Circle is a feature inside the QoL addon (cursor.enabled).
-- The checkbox here is a front-end shortcut that writes directly to
-- the QoL profile so users get a sensible default on first install.
{ label = "Cursor Circle", setting = "cursorCircle", defaultChecked = false },
},
},
{
header = "UI Reskin Addons",
entries = {
{ label = "Blizz UI Enhanced", addon = "EllesmereUIBlizzardSkin" },
{ label = "Friends List", addon = "EllesmereUIFriends" },
{ label = "Damage Meters", comingSoon = true },
{ label = "Chat", comingSoon = true },
{ label = "Bags", comingSoon = true },
{ label = "Mythic+ Timer", addon = "EllesmereUIMythicTimer" },
{ label = "Quest Tracker", addon = "EllesmereUIQuestTracker" },
},
},
}
local function IsAddonEnabled(folder)
if not folder then return true end
if C_AddOns and C_AddOns.GetAddOnEnableState then
local char = UnitName("player")
return (C_AddOns.GetAddOnEnableState(folder, char) or 0) > 0
end
return true
end
local function SetAddonEnabled(folder, enabled)
if not folder or not C_AddOns then return end
local char = UnitName("player")
if enabled then
if C_AddOns.EnableAddOn then C_AddOns.EnableAddOn(folder, char) end
else
if C_AddOns.DisableAddOn then C_AddOns.DisableAddOn(folder, char) end
end
end
local function ShowFirstInstallPopup()
local FONT = EllesmereUI._font or ("Interface\\AddOns\\EllesmereUI\\media\\fonts\\Expressway.ttf")
local NUM_COLS = #GROUPS
local COL_W = 210
local COL_GAP = 18
local CONTENT_LEFT = 41
local CONTENT_RIGHT = 36
local CONTENT_TOP = 120
local HEADER_H = 32
local HEADER_PAD = 6
local ROW_H = 28
local BOX_SZ = 18
local CHECK_INSET = 3
local POPUP_W = CONTENT_LEFT + CONTENT_RIGHT + NUM_COLS * COL_W + (NUM_COLS - 1) * COL_GAP
-- Compute popup height from the tallest group
local tallestRows = 0
for _, g in ipairs(GROUPS) do
if #g.entries > tallestRows then tallestRows = #g.entries end
end
local contentH = HEADER_H + HEADER_PAD + tallestRows * ROW_H
local POPUP_H = CONTENT_TOP + contentH + 110 -- room for links + button
local ppScale = (EllesmereUI.GetPopupScale and EllesmereUI.GetPopupScale()) or 1
-- Dimmer
local dimmer = CreateFrame("Frame", "EUIFirstInstallDimmer", UIParent)
dimmer:SetFrameStrata("FULLSCREEN_DIALOG")
dimmer:SetAllPoints(UIParent)
dimmer:EnableMouse(true)
dimmer:EnableMouseWheel(true)
dimmer:SetScript("OnMouseWheel", function() end)
dimmer:SetScale(ppScale)
local dimTex = dimmer:CreateTexture(nil, "BACKGROUND")
dimTex:SetAllPoints()
dimTex:SetColorTexture(0, 0, 0, 0.35)
-- Popup
local popup = CreateFrame("Frame", "EUIFirstInstallPopup", dimmer)
popup:SetScale(ppScale)
popup:SetFrameStrata("FULLSCREEN_DIALOG")
popup:SetFrameLevel(dimmer:GetFrameLevel() + 10)
PP.Size(popup, POPUP_W, POPUP_H)
popup:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
popup:EnableMouse(true)
local bg = popup:CreateTexture(nil, "BACKGROUND")
bg:SetAllPoints()
bg:SetColorTexture(0.06, 0.08, 0.10, 1)
-- 2px border
local BRD_A = 0.15
local function MakeEdge(anchor1, anchor2, isHoriz)
local t = popup:CreateTexture(nil, "BORDER")
t:SetColorTexture(1, 1, 1, BRD_A)
if t.SetSnapToPixelGrid then t:SetSnapToPixelGrid(false); t:SetTexelSnappingBias(0) end
return t
end
local spT = MakeEdge(); spT:SetPoint("TOPLEFT", 0, 0); spT:SetPoint("TOPRIGHT", 0, 0); spT:SetHeight(2)
local spB = MakeEdge(); spB:SetPoint("BOTTOMLEFT", 0, 0); spB:SetPoint("BOTTOMRIGHT", 0, 0); spB:SetHeight(2)
local spL = MakeEdge(); spL:SetPoint("TOPLEFT", spT, "BOTTOMLEFT"); spL:SetPoint("BOTTOMLEFT", spB, "TOPLEFT"); spL:SetWidth(2)
local spR = MakeEdge(); spR:SetPoint("TOPRIGHT", spT, "BOTTOMRIGHT"); spR:SetPoint("BOTTOMRIGHT", spB, "TOPRIGHT"); spR:SetWidth(2)
-- Title
local title = popup:CreateFontString(nil, "OVERLAY")
title:SetFont(FONT, 22, "")
title:SetTextColor(1, 1, 1, 1)
PP.Point(title, "TOP", popup, "TOP", 0, -32)
title:SetText("Welcome to EllesmereUI")
-- Subtitle
local sub = popup:CreateFontString(nil, "OVERLAY")
sub:SetFont(FONT, 14, "")
sub:SetTextColor(1, 1, 1, 0.45)
PP.Point(sub, "TOP", title, "BOTTOM", 0, -8)
sub:SetWidth(POPUP_W - 60)
sub:SetJustifyH("CENTER")
sub:SetWordWrap(true)
sub:SetText("Choose which addons you want enabled. You can change any of these later in the EllesmereUI settings panel.")
-- Check All / Uncheck All links
local LINK_Y = -103
local LINK_GAP = 20
local checkAllBtn = CreateFrame("Button", nil, popup)
checkAllBtn:SetFrameLevel(popup:GetFrameLevel() + 2)
local checkAllLbl = checkAllBtn:CreateFontString(nil, "OVERLAY")
checkAllLbl:SetFont(FONT, 14, "")
checkAllLbl:SetText("Check All")
checkAllLbl:SetTextColor(1, 1, 1, 0.45)
checkAllLbl:SetPoint("CENTER")
checkAllBtn:SetSize(checkAllLbl:GetStringWidth() + 4, 20)
PP.Point(checkAllBtn, "TOPLEFT", popup, "TOPLEFT", CONTENT_LEFT, LINK_Y)
checkAllBtn:SetScript("OnEnter", function() checkAllLbl:SetTextColor(1, 1, 1, 0.80) end)
checkAllBtn:SetScript("OnLeave", function() checkAllLbl:SetTextColor(1, 1, 1, 0.45) end)
local linkDivider = popup:CreateTexture(nil, "OVERLAY", nil, 7)
linkDivider:SetColorTexture(1, 1, 1, 0.18)
if linkDivider.SetSnapToPixelGrid then linkDivider:SetSnapToPixelGrid(false); linkDivider:SetTexelSnappingBias(0) end
PP.Point(linkDivider, "LEFT", checkAllBtn, "RIGHT", LINK_GAP / 2, 0)
linkDivider:SetWidth(1)
linkDivider:SetHeight(12)
local uncheckAllBtn = CreateFrame("Button", nil, popup)
uncheckAllBtn:SetFrameLevel(popup:GetFrameLevel() + 2)
local uncheckAllLbl = uncheckAllBtn:CreateFontString(nil, "OVERLAY")
uncheckAllLbl:SetFont(FONT, 14, "")
uncheckAllLbl:SetText("Uncheck All")
uncheckAllLbl:SetTextColor(1, 1, 1, 0.45)
uncheckAllLbl:SetPoint("CENTER")
uncheckAllBtn:SetSize(uncheckAllLbl:GetStringWidth() + 4, 20)
PP.Point(uncheckAllBtn, "LEFT", checkAllBtn, "RIGHT", LINK_GAP, 0)
uncheckAllBtn:SetScript("OnEnter", function() uncheckAllLbl:SetTextColor(1, 1, 1, 0.80) end)
uncheckAllBtn:SetScript("OnLeave", function() uncheckAllLbl:SetTextColor(1, 1, 1, 0.45) end)
-- Track all checkbox rows for check-all / uncheck-all + change detection
local allRows = {}
-- Track initial states so we can tell if user changed anything
local initialState = {}
-- Build the three columns
for colIdx, group in ipairs(GROUPS) do
local col = CreateFrame("Frame", nil, popup)
col:SetFrameLevel(popup:GetFrameLevel() + 1)
local colX = CONTENT_LEFT + (colIdx - 1) * (COL_W + COL_GAP)
PP.Point(col, "TOPLEFT", popup, "TOPLEFT", colX, -CONTENT_TOP)
PP.Size(col, COL_W, POPUP_H - CONTENT_TOP - 80)
-- Group header (styled like a class header)
local hdr = col:CreateFontString(nil, "OVERLAY")
hdr:SetFont(FONT, 18, "")
hdr:SetTextColor(ELLESMERE_GREEN.r, ELLESMERE_GREEN.g, ELLESMERE_GREEN.b, 0.9)
PP.Point(hdr, "TOPLEFT", col, "TOPLEFT", 4, -4)
hdr:SetText(group.header)
local yOff = HEADER_H + HEADER_PAD
for _, entry in ipairs(group.entries) do
local row = CreateFrame("Button", nil, col)
PP.Size(row, COL_W, ROW_H)
row:ClearAllPoints()
PP.Point(row, "TOPLEFT", col, "TOPLEFT", 0, -yOff)
local box = CreateFrame("Frame", nil, row)
PP.Size(box, BOX_SZ, BOX_SZ)
PP.Point(box, "LEFT", row, "LEFT", 8, 0)
box:SetFrameLevel(row:GetFrameLevel() + 1)
local boxBg = box:CreateTexture(nil, "BACKGROUND")
boxBg:SetAllPoints()
boxBg:SetColorTexture(CB_BOX_R, CB_BOX_G, CB_BOX_B, 1)
local boxBorder = MakeBorder(box, BORDER_R, BORDER_G, BORDER_B, CB_BRD_A, PP)
local check = box:CreateTexture(nil, "ARTWORK")
PP.Point(check, "TOPLEFT", box, "TOPLEFT", CHECK_INSET, -CHECK_INSET)
PP.Point(check, "BOTTOMRIGHT", box, "BOTTOMRIGHT", -CHECK_INSET, CHECK_INSET)
check:SetColorTexture(ELLESMERE_GREEN.r, ELLESMERE_GREEN.g, ELLESMERE_GREEN.b, 1)
local lbl = row:CreateFontString(nil, "OVERLAY")
lbl:SetFont(FONT, 17, "")
PP.Point(lbl, "LEFT", box, "RIGHT", 8, 0)
lbl:SetTextColor(1, 1, 1, 0.65)
lbl:SetText(entry.label)
-- Initial state resolution:
-- entry.comingSoon -> disabled, greyed, "Coming soon" tooltip
-- entry.addon -> current C_AddOns enable state
-- entry.setting -> start at entry.defaultChecked (front-end shortcut)
-- neither -> disabled, generic greyed state
local checked
if entry.comingSoon then
checked = false
elseif entry.addon then
checked = IsAddonEnabled(entry.addon)
elseif entry.setting then
checked = entry.defaultChecked and true or false
else
checked = false
end
initialState[entry.label] = checked
row._entry = entry
row._checked = checked
row._check = check
row._boxBorder = boxBorder
row._lbl = lbl
row._informational = (entry.comingSoon == true)
or (entry.addon == nil and entry.setting == nil)
local function UpdateVisual(r)
if r._informational then
r._check:Hide()
r._boxBorder:SetColor(BORDER_R, BORDER_G, BORDER_B, CB_BRD_A * 0.4)
r._boxBg:SetColorTexture(CB_BOX_R, CB_BOX_G, CB_BOX_B, 0.35)
r._lbl:SetTextColor(1, 1, 1, 0.25)
elseif r._checked then
r._check:Show()
r._boxBorder:SetColor(ELLESMERE_GREEN.r, ELLESMERE_GREEN.g, ELLESMERE_GREEN.b, CB_ACT_BRD_A)
else
r._check:Hide()
r._boxBorder:SetColor(BORDER_R, BORDER_G, BORDER_B, CB_BRD_A)
end
end
row._boxBg = boxBg
UpdateVisual(row)
row:SetScript("OnClick", function(self)
if self._informational then return end
self._checked = not self._checked
UpdateVisual(self)
end)
row:SetScript("OnEnter", function(self)
if self._informational then
if EllesmereUI.ShowWidgetTooltip then
EllesmereUI.ShowWidgetTooltip(self, "Coming soon")
end
return
end
self._lbl:SetTextColor(1, 1, 1, 0.90)
end)
row:SetScript("OnLeave", function(self)
if EllesmereUI.HideWidgetTooltip then EllesmereUI.HideWidgetTooltip() end
if self._informational then return end
self._lbl:SetTextColor(1, 1, 1, 0.65)
end)
allRows[#allRows + 1] = row
yOff = yOff + ROW_H
end
end
-- Done button (text swaps between "Okay" and "Reload UI" based on changes)
local EG = ELLESMERE_GREEN
local doneBtn = CreateFrame("Button", nil, popup)
doneBtn:SetFrameLevel(popup:GetFrameLevel() + 2)
PP.Size(doneBtn, 200, 39)
PP.Point(doneBtn, "BOTTOM", popup, "BOTTOM", 0, 38)
local doneBg = doneBtn:CreateTexture(nil, "BACKGROUND")
doneBg:SetAllPoints()
doneBg:SetColorTexture(0.06, 0.08, 0.10, 0.92)
local doneBrd = MakeBorder(doneBtn, EG.r, EG.g, EG.b, 0.9, PP)
local doneLbl = doneBtn:CreateFontString(nil, "OVERLAY")
doneLbl:SetFont(FONT, 16, "")
PP.Point(doneLbl, "CENTER", doneBtn, "CENTER", 0, 0)
doneLbl:SetTextColor(EG.r, EG.g, EG.b, 0.9)
doneBtn:SetScript("OnEnter", function()
doneLbl:SetTextColor(EG.r, EG.g, EG.b, 1)
doneBrd:SetColor(EG.r, EG.g, EG.b, 1)
end)
doneBtn:SetScript("OnLeave", function()
doneLbl:SetTextColor(EG.r, EG.g, EG.b, 0.9)
doneBrd:SetColor(EG.r, EG.g, EG.b, 0.9)
end)
local function HasChanges()
for _, row in ipairs(allRows) do
if not row._informational and row._checked ~= initialState[row._entry.label] then
return true
end
end
return false
end
local function RefreshButtonLabel()
if HasChanges() then
doneLbl:SetText("Reload UI")
else
doneLbl:SetText("Okay")
end
end
RefreshButtonLabel()
-- Hook each checkbox click to refresh the button label
for _, row in ipairs(allRows) do
local origOnClick = row:GetScript("OnClick")
row:SetScript("OnClick", function(self, ...)
if origOnClick then origOnClick(self, ...) end
RefreshButtonLabel()
end)
end
-- Check All / Uncheck All wiring
checkAllBtn:SetScript("OnClick", function()
for _, row in ipairs(allRows) do
if not row._informational and not row._checked then
row._checked = true
row._check:Show()
row._boxBorder:SetColor(ELLESMERE_GREEN.r, ELLESMERE_GREEN.g, ELLESMERE_GREEN.b, CB_ACT_BRD_A)
end
end
RefreshButtonLabel()
end)
uncheckAllBtn:SetScript("OnClick", function()
for _, row in ipairs(allRows) do
if not row._informational and row._checked then
row._checked = false
row._check:Hide()
row._boxBorder:SetColor(BORDER_R, BORDER_G, BORDER_B, CB_BRD_A)
end
end
RefreshButtonLabel()
end)
local function Close(triggerReload)
if not EllesmereUIDB then EllesmereUIDB = {} end
EllesmereUIDB.firstInstallPopupShown = true
-- Write QoL cursor setting directly into the profile table so it
-- survives even if the user also disables the QoL addon. NewDB merges
-- defaults with stored values at next init, so the written value sticks.
local function ApplyCursorCircle(enabled)
if not EllesmereUIDB then EllesmereUIDB = {} end
if not EllesmereUIDB.profiles then EllesmereUIDB.profiles = {} end
local profileName = EllesmereUIDB.activeProfile or "Default"
if type(EllesmereUIDB.profiles[profileName]) ~= "table" then
EllesmereUIDB.profiles[profileName] = {}
end
local prof = EllesmereUIDB.profiles[profileName]
if not prof.addons then prof.addons = {} end
if not prof.addons.EllesmereUIQoL then prof.addons.EllesmereUIQoL = {} end
if not prof.addons.EllesmereUIQoL.cursor then prof.addons.EllesmereUIQoL.cursor = {} end
prof.addons.EllesmereUIQoL.cursor.enabled = enabled and true or false
end
-- Always write the Cursor Circle choice, even on "no reload" close,
-- since the default (cursor.enabled = true) differs from the popup's
-- default-unchecked state.
for _, row in ipairs(allRows) do
if row._entry.setting == "cursorCircle" then
ApplyCursorCircle(row._checked)
end
end
if triggerReload then
-- Apply addon enable/disable changes then reload
for _, row in ipairs(allRows) do
if row._entry.addon then
SetAddonEnabled(row._entry.addon, row._checked)
end
end
ReloadUI()
return
end
dimmer:Hide()
-- Re-apply the cursor so the written setting takes effect live
-- (the QoL addon had already applied its default at login).
if _G._ECL_Apply then pcall(_G._ECL_Apply) end
-- No reload needed, so run the deferred conflict check now
if EllesmereUI._RunConflictCheck then
C_Timer.After(0.5, EllesmereUI._RunConflictCheck)
end
end
doneBtn:SetScript("OnClick", function()
Close(HasChanges())
end)
-- Escape to close (treated as Okay if no changes, nothing if changes -- user must decide)
popup:EnableKeyboard(true)
popup:SetScript("OnKeyDown", function(self, key)
if key == "ESCAPE" and not HasChanges() then
self:SetPropagateKeyboardInput(false)
Close(false)
else
self:SetPropagateKeyboardInput(true)
end
end)
dimmer:Show()
end
EllesmereUI.ShowFirstInstallPopup = ShowFirstInstallPopup
-------------------------------------------------------------------------------
-- Trigger on first install only
-------------------------------------------------------------------------------
-- First-install detection captured at parent ADDON_LOADED. At that moment
-- EllesmereUIDB still reflects the PREVIOUS session's data: child addons
-- have not yet initialized their DBs this session, so any profile.addons
-- entries can only have come from a prior version. This cleanly separates
-- upgrades from fresh installs without needing version stamps.
local _showPopupOnLogin = false
local function ComputeShowOnLogin()
if not EllesmereUIDB then
-- Truly fresh: SV not written yet.
return true
end
if EllesmereUIDB.firstInstallPopupShown then
return false
end
local profiles = EllesmereUIDB.profiles
if type(profiles) == "table" then
for _, prof in pairs(profiles) do
if type(prof) == "table" and type(prof.addons) == "table" and next(prof.addons) then
-- Data from a previous session: upgrade user, stamp + skip.
EllesmereUIDB.firstInstallPopupShown = true
return false
end
end
end
-- No prior data exists: treat as fresh install.
return true
end
local loader = CreateFrame("Frame")
loader:RegisterEvent("ADDON_LOADED")
loader:RegisterEvent("PLAYER_LOGIN")
loader:SetScript("OnEvent", function(self, event, addonName)
if event == "ADDON_LOADED" then
if addonName ~= "EllesmereUI" then return end
self:UnregisterEvent("ADDON_LOADED")
_showPopupOnLogin = ComputeShowOnLogin()
elseif event == "PLAYER_LOGIN" then
self:UnregisterEvent("PLAYER_LOGIN")
if not _showPopupOnLogin then return end
C_Timer.After(0.5, function()
if EllesmereUIDB and EllesmereUIDB.firstInstallPopupShown then return end
ShowFirstInstallPopup()
end)
end
end)