-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReleaseNotesWindow.lua
More file actions
485 lines (470 loc) · 19.7 KB
/
Copy pathReleaseNotesWindow.lua
File metadata and controls
485 lines (470 loc) · 19.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
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
local L = _G.QuestTogether.Translate
local QuestTogether = _G.QuestTogether
local LibChev = QuestTogether.LibChev
local LOGO = "Interface\\AddOns\\QuestTogether\\Media\\QuestTogetherIcon"
local LOGO_SIZE, LOGO_GAP = 80, 16
-- These factories are addon-owned seams. Tests supply private frames instead
-- of replacing CreateFrame, UIParent, or any shared Blizzard state.
function QuestTogether:GetReleaseNotesUIParent()
return UIParent
end
function QuestTogether:CreateReleaseNotesUIFrame(...)
return CreateFrame(...)
end
local function Guard(addon, region)
return not addon:IsRuntimeRestricted() and LibChev.CanMutateOwnedRegion(region)
end
local function Call(addon, region, method, ...)
if not Guard(addon, region) then
error("release notes region unavailable", 0)
end
return region[method](region, ...)
end
local function ParentDimension(addon, parent, methodName)
local method = addon:GetAccessibleFrameMember(parent, methodName)
if type(method) ~= "function" then
return nil
end
local ok, value = pcall(method, parent)
value = ok and addon:SafeToNumber(value) or nil
return value and value > 0 and value or nil
end
local function New(addon, kind, parent)
if addon:IsRuntimeRestricted() or not addon:CanAccessForeignFrame(parent) then
error("release notes parent unavailable", 0)
end
local frame = addon:CreateReleaseNotesUIFrame(kind, nil, parent)
if not Guard(addon, frame) then
error("release notes frame unavailable", 0)
end
return frame
end
local function Texture(addon, parent, template, layer, width, height)
local texture = Call(addon, parent, "CreateTexture", nil, layer or "BORDER", template)
Call(addon, texture, "ClearAllPoints")
if width then
Call(addon, texture, "SetSize", width, height)
end
return texture
end
local function Label(addon, parent, font)
local label = Call(addon, parent, "CreateFontString", nil, "OVERLAY", font or "GameFontHighlight")
Call(addon, label, "SetJustifyH", "LEFT")
Call(addon, label, "SetJustifyV", "TOP")
Call(addon, label, "SetWordWrap", true)
return label
end
local function Script(addon, frame, region, event, callback)
Call(addon, region, "SetScript", event, function(_, ...)
-- Ignore the callback's self; only captured addon-owned objects are used.
if Guard(addon, frame) and Guard(addon, region) then
pcall(callback, ...)
end
end)
end
local function Button(addon, frame, parent, text, callback)
local button = New(addon, "Button", parent)
for _, art in ipairs({
{ "SetNormalTexture", "DialogButtonNormalTexture" },
{ "SetPushedTexture", "DialogButtonPushedTexture" },
{ "SetHighlightTexture", "DialogButtonHighlightTexture" },
}) do
local texture = Texture(addon, button, art[2], "ARTWORK")
Call(addon, texture, "SetAllPoints")
Call(addon, button, art[1], texture)
end
button.label = Label(addon, button, "GameFontNormalSmall")
Call(addon, button.label, "SetPoint", "CENTER")
Call(addon, button.label, "SetJustifyH", "CENTER")
Call(addon, button.label, "SetText", text)
Script(addon, frame, button, "OnClick", callback)
return button
end
local function SetScroll(addon, frame, value)
value = addon:SafeToNumber(value)
if not value then
return
end
value = math.max(0, math.min(frame.maximumScroll or 0, value))
Call(addon, frame.scroll, "SetVerticalScroll", value)
frame.scrollOffset = value
frame.syncScroll = true
local ok, err = pcall(Call, addon, frame.slider, "SetValue", value)
frame.syncScroll = false
if not ok then
error(err, 0)
end
end
local function CreatePartnerExamples(addon, parent)
local gallery = New(addon, "Frame", parent)
Call(addon, gallery, "Hide")
gallery.columns = {}
for index = 1, 2 do
local column = New(addon, "Frame", gallery)
gallery.columns[index] = column
local heading = Label(addon, column, "GameFontNormalSmall")
Call(addon, heading, "SetPoint", "TOPLEFT")
Call(addon, heading, "SetPoint", "TOPRIGHT")
Call(addon, heading, "SetHeight", 32)
Call(addon, heading, "SetJustifyH", "CENTER")
Call(addon, heading, "SetText", index == 1 and L("QT player") or L("Looking for questing partners"))
local logo = Texture(addon, column, nil, "ARTWORK", 32, 32)
Call(addon, logo, "SetPoint", "TOP", column, "TOP", -28, -38)
Call(addon, logo, "SetTexture", LOGO)
if index == 2 then
for layer = 1, 8 do
local angle = (layer - 1) * math.pi / 4
local glow = Texture(addon, column, nil, "BACKGROUND", 32, 32)
Call(addon, glow, "SetPoint", "CENTER", logo, "CENTER", 4 * math.cos(angle), 4 * math.sin(angle))
Call(addon, glow, "SetTexture", LOGO)
Call(addon, glow, "SetVertexColor", 1, 0.78, 0.12, 0.9)
Call(addon, glow, "SetBlendMode", "ADD")
end
end
local function Circle(size, layer, r, g, b, alpha, additive)
local circle = Texture(addon, column, nil, layer, size, size)
Call(addon, circle, "SetPoint", "TOP", column, "TOP", 28, -54 + size / 2)
Call(addon, circle, "SetColorTexture", r, g, b, alpha)
if additive then
Call(addon, circle, "SetBlendMode", "ADD")
end
local mask = Call(addon, column, "CreateMaskTexture")
Call(addon, mask, "SetAllPoints", circle)
Call(
addon,
mask,
"SetTexture",
"Interface\\CharacterFrame\\TempPortraitAlphaMask",
"CLAMPTOBLACKADDITIVE",
"CLAMPTOBLACKADDITIVE"
)
Call(addon, circle, "AddMaskTexture", mask)
end
if index == 1 then
Circle(12, "BACKGROUND", 0, 0, 0, 1)
else
for layer = 1, 4 do
Circle(16 - (layer - 1) * 2, "BACKGROUND", 1, 0.8, 0.15, 0.06 + layer * 0.07, true)
end
end
Circle(9, "ARTWORK", 0.25, 0.78, 0.92, 1)
for _, example in ipairs({ { -28, L("Logo") }, { 28, L("Map dot") } }) do
local caption = Label(addon, column, "GameFontHighlightSmall")
Call(addon, caption, "SetPoint", "TOP", column, "TOP", example[1], -80)
Call(addon, caption, "SetText", example[2])
end
end
return gallery
end
local function Create(addon, parent)
local frame = New(addon, "Frame", parent)
Call(addon, frame, "Hide")
-- Cache immediately so an interrupted build can be hidden and retried.
addon.releaseNotesWindow = frame
Call(addon, frame, "SetPoint", "CENTER")
Call(addon, frame, "SetFrameStrata", "DIALOG")
Call(addon, frame, "SetToplevel", true)
Call(addon, frame, "SetFlattensRenderLayers", true)
Call(addon, frame, "SetClampedToScreen", true)
Call(addon, frame, "EnableMouse", true)
local background = Texture(addon, frame, nil, "BACKGROUND")
Call(addon, background, "SetAllPoints")
Call(addon, background, "SetTexture", "Interface\\FrameGeneral\\UI-Background-Marble", "REPEAT", "REPEAT")
Call(addon, background, "SetHorizTile", true)
Call(addon, background, "SetVertTile", true)
local topLeft = Texture(addon, frame, "UI-Frame-TopLeftCorner", "OVERLAY", 33, 33)
Call(addon, topLeft, "SetPoint", "TOPLEFT", -6, 1)
local topRight = Texture(addon, frame, "UI-Frame-TopCornerRight", "OVERLAY", 33, 33)
Call(addon, topRight, "SetPoint", "TOPRIGHT", 0, 1)
local bottomLeft = Texture(addon, frame, "UI-Frame-BotCornerLeft", "BORDER", 14, 14)
Call(addon, bottomLeft, "SetPoint", "BOTTOMLEFT", -6, -5)
local bottomRight = Texture(addon, frame, "UI-Frame-BotCornerRight", "BORDER", 11, 11)
Call(addon, bottomRight, "SetPoint", "BOTTOMRIGHT", 0, -5)
for _, edge in ipairs({
{ "_UI-Frame-TitleTile", "TOPLEFT", topLeft, "TOPRIGHT", "TOPRIGHT", topRight, "TOPLEFT", 256, 28 },
{ "_UI-Frame-Bot", "BOTTOMLEFT", bottomLeft, "BOTTOMRIGHT", "BOTTOMRIGHT", bottomRight, "BOTTOMLEFT", 256, 9 },
{ "!UI-Frame-LeftTile", "TOPLEFT", topLeft, "BOTTOMLEFT", "BOTTOMLEFT", bottomLeft, "TOPLEFT", 16, 256 },
{ "!UI-Frame-RightTile", "TOPRIGHT", topRight, "BOTTOMRIGHT", "BOTTOMRIGHT", bottomRight, "TOPRIGHT", 10, 256 },
}) do
local texture = Texture(addon, frame, edge[1], "BORDER", edge[8], edge[9])
Call(addon, texture, "SetPoint", edge[2], edge[3], edge[4])
Call(addon, texture, "SetPoint", edge[5], edge[6], edge[7])
end
local titleBackground = Texture(addon, frame, "_UI-Frame-TitleTileBg", "BACKGROUND", 256, 18)
Call(addon, titleBackground, "SetPoint", "TOPLEFT", 2, -1)
Call(addon, titleBackground, "SetPoint", "TOPRIGHT", -25, -1)
frame.title = Label(addon, frame, "GameFontNormal")
Call(addon, frame.title, "SetPoint", "TOPLEFT", 16, -5)
frame.close = New(addon, "Button", frame)
Call(addon, frame.close, "SetSize", 32, 32)
Call(addon, frame.close, "SetPoint", "TOPRIGHT", 2, 1)
for _, art in ipairs({
{ "SetNormalTexture", "Up" },
{ "SetPushedTexture", "Down" },
{ "SetHighlightTexture", "Highlight" },
}) do
local texture = Texture(addon, frame.close, nil, "ARTWORK")
Call(addon, texture, "SetAllPoints")
Call(addon, texture, "SetTexture", "Interface\\Buttons\\UI-Panel-MinimizeButton-" .. art[2])
if art[2] == "Highlight" then
Call(addon, texture, "SetBlendMode", "ADD")
end
Call(addon, frame.close, art[1], texture)
end
Script(addon, frame, frame.close, "OnClick", function()
Call(addon, frame, "Hide")
end)
frame.settings = New(addon, "Button", frame)
Call(addon, frame.settings, "SetSize", 135, 24)
Call(addon, frame.settings, "SetPoint", "BOTTOMRIGHT", -20, 17)
for _, art in ipairs({
{ "SetNormalTexture", "DialogButtonNormalTexture" },
{ "SetPushedTexture", "DialogButtonPushedTexture" },
{ "SetHighlightTexture", "DialogButtonHighlightTexture" },
}) do
local texture = Texture(addon, frame.settings, art[2], "ARTWORK")
Call(addon, texture, "SetAllPoints")
Call(addon, frame.settings, art[1], texture)
end
local settingsLabel = Label(addon, frame.settings, "GameFontNormalSmall")
Call(addon, settingsLabel, "SetPoint", "CENTER")
Call(addon, settingsLabel, "SetText", L("Settings"))
Script(addon, frame, frame.settings, "OnClick", function()
if addon:OpenOptionsWindow() == true then
Call(addon, frame, "Hide")
end
end)
frame.discord = New(addon, "Button", frame)
Call(addon, frame.discord, "SetSize", 320, 24)
Call(addon, frame.discord, "SetPoint", "BOTTOMLEFT", 22, 17)
for _, art in ipairs({
{ "SetNormalTexture", "DialogButtonNormalTexture" },
{ "SetPushedTexture", "DialogButtonPushedTexture" },
{ "SetHighlightTexture", "DialogButtonHighlightTexture" },
}) do
local texture = Texture(addon, frame.discord, art[2], "ARTWORK")
Call(addon, texture, "SetAllPoints")
Call(addon, frame.discord, art[1], texture)
end
local discordLabel = Label(addon, frame.discord, "GameFontNormalSmall")
Call(addon, discordLabel, "SetPoint", "CENTER")
Call(addon, discordLabel, "SetText", L("Discord — Feedback & Support"))
Script(addon, frame, frame.discord, "OnClick", function()
if addon:OpenDiscordSupport() then
Call(addon, frame, "Hide")
end
end)
frame.footer = Label(addon, frame, "GameFontHighlightSmall")
Call(addon, frame.footer, "SetPoint", "BOTTOMLEFT", 22, 52)
Call(addon, frame.footer, "SetText", L("Read this again: /qt notes"))
frame.navigation = {}
for index, text in ipairs({ L("Older"), L("Newer"), L("History"), L("Latest") }) do
local action = index
frame.navigation[index] = Button(addon, frame, frame, text, function()
local browser = rawget(addon, "releaseNotesBrowser")
if not browser then return end
if action == 1 then addon:ShowReleaseNotesPage(browser.index + 1)
elseif action == 2 then addon:ShowReleaseNotesPage(browser.index - 1)
elseif action == 3 then addon:ShowReleaseNotesPage(browser.index, not browser.history)
else addon:ShowReleaseNotesPage(1) end
end)
end
frame.historyRows = {}
frame.scroll = New(addon, "ScrollFrame", frame)
Call(addon, frame.scroll, "SetPoint", "TOPLEFT", 22, -84)
Call(addon, frame.scroll, "EnableMouseWheel", true)
frame.content = New(addon, "Frame", frame.scroll)
Call(addon, frame.scroll, "SetScrollChild", frame.content)
frame.logo = Texture(addon, frame.content, nil, "ARTWORK", LOGO_SIZE, LOGO_SIZE)
Call(addon, frame.logo, "SetPoint", "TOP", frame.content, "TOP", 0, 0)
Call(addon, frame.logo, "SetTexture", LOGO)
frame.partnerExamples = CreatePartnerExamples(addon, frame.content)
frame.slider = New(addon, "Slider", frame)
Call(addon, frame.slider, "Hide")
Call(addon, frame.slider, "SetPoint", "TOPLEFT", frame.scroll, "TOPRIGHT", 8, 0)
Call(addon, frame.slider, "SetWidth", 14)
Call(addon, frame.slider, "SetOrientation", "VERTICAL")
Call(addon, frame.slider, "SetMinMaxValues", 0, 0)
Call(addon, frame.slider, "SetValueStep", 1)
Call(addon, frame.slider, "EnableMouseWheel", true)
local track = Texture(addon, frame.slider, nil, "BACKGROUND")
Call(addon, track, "SetAllPoints")
Call(addon, track, "SetColorTexture", 0.12, 0.12, 0.12, 0.85)
local thumb = Texture(addon, frame.slider, nil, "OVERLAY", 18, 30)
Call(addon, thumb, "SetTexture", "Interface\\Buttons\\UI-ScrollBar-Knob")
Call(addon, frame.slider, "SetThumbTexture", thumb)
Script(addon, frame, frame.slider, "OnValueChanged", function(value)
if not frame.syncScroll then
SetScroll(addon, frame, value)
end
end)
local function Wheel(delta)
delta = addon:SafeToNumber(delta)
if delta then
SetScroll(addon, frame, (frame.scrollOffset or 0) - delta * 36)
end
end
Script(addon, frame, frame.scroll, "OnMouseWheel", Wheel)
Script(addon, frame, frame.slider, "OnMouseWheel", Wheel)
frame.labels, frame.ready = {}, true
return frame
end
local function Render(addon, notes, version, isFirstUse)
if addon:IsRuntimeRestricted() or not addon:CanAccessTable(notes) then
return false
end
local parent = addon:GetReleaseNotesUIParent()
if not addon:CanAccessForeignFrame(parent) then
return false
end
local parentWidth = ParentDimension(addon, parent, "GetWidth")
local parentHeight = ParentDimension(addon, parent, "GetHeight")
if not parentWidth or not parentHeight then
return false
end
local frame = rawget(addon, "releaseNotesWindow")
if frame and not Guard(addon, frame) then
return false
end
if frame and not frame.ready then
Call(addon, frame, "Hide")
addon.releaseNotesWindow = nil
frame = nil
end
frame = frame or Create(addon, parent)
local width = math.max(360, math.min(660, parentWidth * 0.88))
local scale = math.min(1, parentWidth * 0.92 / width, parentHeight * 0.92 / 260)
local maximumHeight = math.max(260, math.min(650, parentHeight * 0.88 / scale))
local contentWidth, offset, count = width - 68, LOGO_SIZE + LOGO_GAP, 0
local browser = rawget(addon, "releaseNotesBrowser")
local history = browser and browser.history
local entry = browser and browser.entries[browser.index]
for index, button in ipairs(frame.navigation) do
local buttonWidth = (contentWidth - 18) / 4
Call(addon, button, "ClearAllPoints")
Call(addon, button, "SetPoint", "TOPLEFT", 22 + (index - 1) * (buttonWidth + 6), -36)
Call(addon, button, "SetSize", buttonWidth, 32)
Call(addon, button.label, "SetWidth", buttonWidth - 8)
local enabled = browser ~= nil and (index == 3
or (index == 4 and (history or browser.index > 1))
or (not history and (index == 1 and browser.index < #browser.entries or index == 2 and browser.index > 1)))
Call(addon, button, "SetEnabled", enabled)
Call(addon, button.label, "SetAlpha", enabled and 1 or 0.4)
end
Call(addon, frame.navigation[3].label, "SetText", history and L("Back") or L("History"))
for _, row in ipairs(frame.historyRows) do Call(addon, row, "Hide") end
Call(addon, frame, "SetScale", scale)
Call(addon, frame.title, "SetWidth", width - 70)
Call(addon, frame.title, "SetText", "QuestTogether " .. addon:SafeTrimString(version, ""))
Call(addon, frame.footer, "SetWidth", width - 44)
local function Add(text, font, gap)
text = addon:SafeTrimString(text, "")
if text == "" then
return
end
count = count + 1
local label = frame.labels[count]
if not label then
label = Label(addon, frame.content, font)
frame.labels[count] = label
end
Call(addon, label, "SetFontObject", font)
Call(addon, label, "ClearAllPoints")
Call(addon, label, "SetPoint", "TOPLEFT", 0, -offset)
Call(addon, label, "SetWidth", contentWidth)
Call(addon, label, "SetText", text)
Call(addon, label, "Show")
local height = addon:SafeToNumber(Call(addon, label, "GetStringHeight"))
if not height or height <= 0 then
error("release notes text measurement unavailable", 0)
end
offset = offset + height + gap
end
Call(addon, frame.partnerExamples, "Hide")
Call(addon, frame.logo, history and "Hide" or "Show")
if history then
offset = 0
Call(addon, frame.title, "SetText", "QuestTogether — " .. L("Release history"))
Add(L("Release history"), "GameFontNormalLarge", 12)
Add(L("Choose a version to read its patch notes. Dates are in UTC."), "GameFontHighlight", 16)
for index, item in ipairs(browser.entries) do
local row = frame.historyRows[index]
if not row then
local selected = index
row = Button(addon, frame, frame.content, "", function() addon:ShowReleaseNotesPage(selected) end)
frame.historyRows[index] = row
end
Call(addon, row.label, "SetWidth", contentWidth - 24)
Call(addon, row.label, "SetText", item.version .. " · " .. (item.date or L("Date unavailable"))
.. "\n" .. addon:SafeTrimString(item.notes.sections[1].title, ""))
local rowHeight = math.max(48, (addon:SafeToNumber(Call(addon, row.label, "GetStringHeight")) or 32) + 16)
Call(addon, row, "ClearAllPoints")
Call(addon, row, "SetPoint", "TOPLEFT", 0, -offset)
Call(addon, row, "SetSize", contentWidth, rowHeight)
Call(addon, row, "Show")
offset = offset + rowHeight + 6
end
else
Add(isFirstUse and L("Welcome to QuestTogether") or L("What's new"), "GameFontNormalLarge", 14)
if entry and entry.date then Add(string.format(L("Release date (UTC): %s"), entry.date), "GameFontHighlightSmall", 12) end
if entry and entry.englishOnly then Add(L("These notes are available in English only."), "GameFontHighlightSmall", 12) end
Add(notes.welcome, "GameFontHighlight", 18)
local examplesShown = false
if addon:CanAccessTable(notes.sections) then
for _, section in ipairs(notes.sections) do
if addon:CanAccessTable(section) then
Add(section.title, "GameFontNormal", 8)
if addon:CanAccessTable(section.items) then
for _, item in ipairs(section.items) do
local text = addon:SafeTrimString(item, "")
if text ~= "" then
Add("• " .. text, "GameFontHighlight", 9)
end
end
end
if section.illustration == "quest-partners" and not examplesShown then
local gallery = frame.partnerExamples
Call(addon, gallery, "ClearAllPoints")
Call(addon, gallery, "SetPoint", "TOPLEFT", 0, -offset)
Call(addon, gallery, "SetSize", contentWidth, 112)
for index, column in ipairs(gallery.columns) do
Call(addon, column, "ClearAllPoints")
Call(addon, column, "SetPoint", "TOPLEFT", (index - 1) * contentWidth / 2, 0)
Call(addon, column, "SetSize", contentWidth / 2, 112)
end
Call(addon, gallery, "Show")
offset, examplesShown = offset + 120, true
end
offset = offset + 10
end
end
end
end
for index = count + 1, #frame.labels do
Call(addon, frame.labels[index], "Hide")
end
local contentHeight = math.max(1, offset)
local height = math.min(maximumHeight, math.max(260, contentHeight + 168))
local viewportHeight = height - 168
Call(addon, frame, "SetSize", width, height)
Call(addon, frame.scroll, "SetSize", contentWidth, viewportHeight)
Call(addon, frame.content, "SetSize", contentWidth, math.max(contentHeight, viewportHeight))
Call(addon, frame.slider, "SetHeight", viewportHeight)
frame.maximumScroll = math.max(0, contentHeight - viewportHeight)
Call(addon, frame.slider, "SetMinMaxValues", 0, frame.maximumScroll)
Call(addon, frame.slider, frame.maximumScroll > 0 and "Show" or "Hide")
SetScroll(addon, frame, 0)
Call(addon, frame, "Show")
local visible = Call(addon, frame, "IsVisible")
return addon:CanAccessValue(visible) and visible == true
end
function QuestTogether:RenderReleaseNotesWindow(notes, version, isFirstUse)
local ok, visible = pcall(Render, self, notes, version, isFirstUse)
if not ok then
local frame = rawget(self, "releaseNotesWindow")
if Guard(self, frame) then
pcall(Call, self, frame, "Hide")
end
end
return ok and visible == true
end