-
Notifications
You must be signed in to change notification settings - Fork 14
/
WorldQuestTracker_Core.lua
3334 lines (2729 loc) · 135 KB
/
WorldQuestTracker_Core.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
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
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--sort when showing by zone
--faction buttons are hidding when summary hide()
-- ~review
local addonId, wqtInternal = ...
--world quest tracker object
local WorldQuestTracker = WorldQuestTrackerAddon
if (not WorldQuestTracker) then
return
end
--framework
---@type detailsframework
local DF = _G ["DetailsFramework"]
if (not DF) then
print("|cFFFFAA00World Quest Tracker: framework not found, if you just installed or updated the addon, please restart your client.|r")
return
end
--localization
local L = DF.Language.GetLanguageTable(addonId)
local ff = WorldQuestTrackerFinderFrame
local WorldMapFrame = WorldMapFrame
local anchorFrame = WorldMapFrame.ScrollContainer
local worldFramePOIs = WorldQuestTrackerWorldMapPOI
WorldQuestTracker.WorldSummary = CreateFrame("frame", "WorldQuestTrackerWorldSummaryFrame", anchorFrame, "BackdropTemplate")
local _
local isWorldQuest = QuestUtils_IsQuestWorldQuest
local GameCooltip = GameCooltip2
local LibWindow = LibStub("LibWindow-1.1")
if (not LibWindow) then
print("|cFFFFAA00World Quest Tracker|r: libwindow not found, did you just updated the addon? try reopening the client.|r")
end
--on hover over an icon on the world map(possivle deprecated on 8.0)
hooksecurefunc("TaskPOI_OnEnter", function(self)
WorldQuestTracker.CurrentHoverQuest = self.questID
if (self.Texture and self.IsZoneQuestButton) then
self.Texture:SetBlendMode("ADD")
end
end)
--on leave the hover over of an icon in the world map(possivle deprecated on 8.0)
hooksecurefunc("TaskPOI_OnLeave", function(self)
WorldQuestTracker.CurrentHoverQuest = nil
if (self.Texture and self.IsZoneQuestButton) then
self.Texture:SetBlendMode("BLEND")
end
end)
--update the zone which the player are current placed(possivle deprecated on 8.0)
function WorldQuestTracker:UpdateCurrentStandingZone()
if (WorldMapFrame:IsShown()) then
return
end
if (WorldQuestTracker.ScheduledMapFrameShownCheck and not WorldQuestTracker.ScheduledMapFrameShownCheck._cancelled) then
WorldQuestTracker.ScheduledMapFrameShownCheck:Cancel()
end
local mapID = WorldQuestTracker.GetCurrentMapAreaID()
if (mapID == 1080 or mapID == 1072) then
mapID = 1024
end
WorldMapFrame.currentStandingZone = mapID
WorldQuestTracker:FullTrackerUpdate()
end
--i'm not sure what this is for
function WorldQuestTracker:WaitUntilWorldMapIsClose()
if (WorldQuestTracker.ScheduledMapFrameShownCheck and not WorldQuestTracker.ScheduledMapFrameShownCheck._cancelled) then
WorldQuestTracker.ScheduledMapFrameShownCheck:Cancel()
end
WorldQuestTracker.ScheduledMapFrameShownCheck = C_Timer.NewTicker(1, WorldQuestTracker.UpdateCurrentStandingZone)
end
--~mapchange ~map change ~change map ~changemap
-- default world quest pins from the map
hooksecurefunc(WorldMap_WorldQuestPinMixin, "RefreshVisuals", function(self)
if (self.questID) then
WorldQuestTracker.DefaultWorldQuestPin [self.questID] = self
if (not WorldQuestTracker.ShowDefaultWorldQuestPin [self.questID]) then
if (WorldQuestTracker.db.profile.zone_map_config.show_widgets) then
self:Hide()
end
end
end
end)
--OnTick
local OnUpdateDelay = .5
WorldMapFrame:HookScript("OnUpdate", function(self, deltaTime)
if (OnUpdateDelay < 0) then
OnUpdateDelay = .5
else
OnUpdateDelay = OnUpdateDelay - deltaTime
end
end)
local currentMap
--apos o click, verifica se pode mostrar os widgets e permitir que o mapa seja alterado no proximo tick
local allow_map_change = function(...)
if (currentMap == WorldQuestTracker.GetCurrentMapAreaID()) then
WorldQuestTracker.CanShowWorldMapWidgets(true)
else
WorldQuestTracker.CanShowWorldMapWidgets(false)
end
WorldQuestTracker.CanChangeMap = true
WorldQuestTracker.LastMapID = WorldQuestTracker.GetCurrentMapAreaID()
WorldQuestTracker.UpdateZoneWidgets(true)
if (not WorldQuestTracker.MapData.QuestHubs [WorldQuestTracker.LastMapID] and WorldQuestTracker.IsPlayingLoadAnimation()) then
WorldQuestTracker.StopLoadingAnimation()
end
end
-- 8.0 is this still applied? - argus button is nameless in 8.0
if (BrokenIslesArgusButton) then
--> at the current PTR state, goes directly to argus map
BrokenIslesArgusButton:HookScript("OnClick", function(self)
if (not BrokenIslesArgusButton:IsProtected() and WorldQuestTracker.db.profile.rarescan.autosearch and WorldQuestTracker.db.profile.rarescan.add_from_premade and WorldQuestTracker.LastGFSearch + WorldQuestTracker.db.profile.rarescan.autosearch_cooldown < time()) then
C_LFGList.Search(6, LFGListSearchPanel_ParseSearchTerms(""))
WorldQuestTracker.LastGFSearch = time()
end
allow_map_change()
end)
--> argus map zone use an overlaied button for each of its three zones
MacAreeButton:HookScript("OnClick", function(self)
allow_map_change()
end)
AntoranWastesButton:HookScript("OnClick", function(self)
allow_map_change()
end)
KrokuunButton:HookScript("OnClick", function(self)
allow_map_change()
end)
end
WorldMapActionButtonPressed = function()
WorldQuestTracker.Temp_HideZoneWidgets = GetTime() + 5
WorldQuestTracker.UpdateZoneWidgets(true)
WorldQuestTracker.ScheduleZoneMapUpdate(6)
end
hooksecurefunc("ClickWorldMapActionButton", function()
--WorldMapActionButtonPressed()
end)
WorldMapFrame:HookScript("OnHide", function()
if (WorldQuestTracker.RefreshTrackerWidgets) then --[string "@WorldQuestTracker/WorldQuestTracker_Core.lua"]:379: in function <WorldQuestTracker/WorldQuestTracker_Core.lua:378>
C_Timer.After(0.2, WorldQuestTracker.RefreshTrackerWidgets) --2452x bad argument #2 to '?'(Usage: C_Timer.After(seconds, callback)) --WorldQuestTracker.RefreshTrackerWidgets is nil?
end
end)
WorldQuestTracker.UpdateWorldMapFrameAnchor = function(resetLeft)
if (WorldQuestTracker.db.profile.map_frame_anchor == "center") then
if (not resetLeft) then
WorldMapFrame:ClearAllPoints()
WorldMapFrame:SetPoint("center", UIParent, "center", 100, 0)
else
C_Timer.After(0.1, function()
WorldMapFrame:ClearAllPoints()
WorldMapFrame:SetPoint("center", UIParent, "center", 100, 0)
end)
end
elseif (WorldQuestTracker.db.profile.map_frame_anchor == "left" and resetLeft) then
local mapID = WorldMapFrame.mapID
ToggleWorldMap()
C_Timer.After(0.03, function()
OpenWorldMap(mapID)
end)
end
end
local defaultWorldMapScale
WorldQuestTracker.UpdateWorldMapFrameScale = function(reset)
--this feature is having some problem in 8.1 retail -- ~review
if (true) then
return
end
if (WorldQuestTracker.db.profile.map_frame_scale_enabled) then
--save the original scale if is the first time applying the modifier
if (not defaultWorldMapScale) then
defaultWorldMapScale = WorldMapFrame:GetScale()
end
--apply the scale modifier
local scaleMod = WorldQuestTracker.db.profile.map_frame_scale_mod
WorldMapFrame:SetScale(scaleMod)
elseif (reset) then
--if reset is called from the options menu, check if there's a default value saved and restore it
if (defaultWorldMapScale) then
WorldMapFrame:SetScale(defaultWorldMapScale)
end
end
end
-- ~toggle | open and close the map frame
local firstAnchorRun = true
WorldQuestTracker.OnToggleWorldMap = function(self)
if (not WorldMapFrame:IsShown()) then
--closed
C_Timer.After(0.2, WorldQuestTracker.RefreshTrackerWidgets)
else
--opened
C_Timer.After(0.2, WorldQuestTracker.RefreshStatusBarVisibility)
WorldQuestTracker.CatchMapProvider(true)
WorldQuestTracker.InitializeWorldWidgets()
end
WorldQuestTracker.IsLoaded = true
WorldMapFrame.currentStandingZone = WorldQuestTracker.GetCurrentMapAreaID()
if (WorldMapFrame:IsShown()) then
WorldQuestTracker.MapSeason = WorldQuestTracker.MapSeason + 1
WorldQuestTracker.MapOpenedAt = GetTime()
if (WorldQuestTrackerBanPanel) then
if (WorldQuestTrackerBanPanel:IsShown()) then
C_Timer.After(1, WorldQuestTrackerBanPanel.UpdateQuestList)
end
end
end
WorldQuestTracker.lastMapTap = GetTime()
WorldQuestTracker.LastMapID = WorldMapFrame.mapID
if (WorldMapFrame:IsShown()) then
--� a primeira vez que � mostrado?
if (not WorldMapFrame.hadItsFirstRunAlready) then
local currentMapId = WorldMapFrame.mapID
if (WorldQuestTracker.DoesMapHasWorldQuests(currentMapId)) then
local zoneQuestHubMapId = WorldQuestTracker.MapData.ZoneToHub[currentMapId]
if (zoneQuestHubMapId) then
WorldQuestTracker.PreloadWorldQuestsForQuestHub(zoneQuestHubMapId)
end
end
WorldMapFrame.hadItsFirstRunAlready = true
wqtInternal.CreateSummary()
--> some addon is adding these words on the global namespace.
--> I trully believe that it's not intended at all, so let's just clear.
--> it is messing with the framework.
_G ["left"] = nil
_G ["right"] = nil
_G ["topleft"] = nil
_G ["topright"] = nil
function WorldQuestTracker.OpenSharePanel()
if (WorldQuestTrackerSharePanel) then
WorldQuestTrackerSharePanel:Show()
return
end
local f = DF:CreateSimplePanel(UIParent, 460, 90, "Discord Server", "WorldQuestTrackerSharePanel")
f:SetFrameStrata("TOOLTIP")
f:SetPoint("center", UIParent, "center", 0, 0)
DF:CreateBorder(f)
local LinkBox = DF:CreateTextEntry(f, function()end, 380, 20, "ExportLinkBox", _, _, DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
LinkBox:SetPoint("center", f, "center", 0, -10)
f:SetScript("OnShow", function()
LinkBox:SetText(DF.AuthorInfo.Discord)
C_Timer.After(1, function()
LinkBox:SetFocus(true)
LinkBox:HighlightText()
end)
end)
f:Hide()
f:Show()
end
function WorldQuestTracker.OpenQuestBanPanel()
if (not WorldQuestTrackerBanPanel) then
local config = {
scroll_width = 480,
scroll_height = 270,
scroll_line_height = 18,
scroll_lines = 14,
backdrop_color = {.4, .4, .4, .2},
backdrop_color_highlight = {.4, .4, .4, .6},
}
local f = DF:CreateSimplePanel(UIParent, config.scroll_width + 30, config.scroll_height + 30, "World Quest Tracker Quest Blacklist", "WorldQuestTrackerBanPanel")
f:SetFrameStrata("DIALOG")
f:SetPoint("center", UIParent, "center")
DF:CreateBorder(f)
local banQuestRefresh = function(self, questList, offset, totalLines)
for i = 1, totalLines do
local index = i + offset
local data = questList [index]
if (data) then
local line = self:GetLine(i)
if (line) then
local questTitle, questID, factionID, alreadyBanned = unpack(data)
line.name:SetText(questTitle)
line.questIDLabel:SetText(questID)
line.questID = questID
line.icon:SetTexture(WorldQuestTracker.MapData.FactionIcons [factionID])
line.removebutton.questID = questID
line.addbutton.questID = questID
if (alreadyBanned) then
line.addbutton:Hide()
line.removebutton:Show()
else
--not banned
line.addbutton:Show()
line.removebutton:Hide()
end
end
end
end
end
local banQuestScroll = DF:CreateScrollBox(f, "$parentBanQuestScroll", banQuestRefresh, {}, config.scroll_width, config.scroll_height, config.scroll_lines, config.scroll_line_height)
DF:ReskinSlider(banQuestScroll)
banQuestScroll:SetPoint("topleft", f, "topleft", 5, -25)
local onclick_add_button = function(self)
local questID = self.questID
WorldQuestTracker.db.profile.banned_quests [questID] = true
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true, true, false, true)
elseif (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneWidgets(true)
end
f:UpdateQuestList()
end
local onclick_remove_button = function(self)
local questID = self.questID
WorldQuestTracker.db.profile.banned_quests [questID] = nil
if (WorldMapFrame:IsShown()) then
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true, true, false, true)
elseif (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneWidgets(true)
end
end
f:UpdateQuestList()
end
local highlightColor = {1, .2, .1}
local line_onenter = function(self)
self:SetBackdropColor(unpack(config.backdrop_color_highlight))
if (self.questID) then
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.HighlightOnWorldMap(self.questID, 1.3, highlightColor)
elseif (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.HighlightOnZoneMap(self.questID, 1.3, highlightColor)
end
end
end
local line_onleave = function(self)
self:SetBackdropColor(unpack(config.backdrop_color))
WorldQuestTracker.HideMapQuestHighlight()
end
--create the scroll widgets
local createLine = function(self, index)
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint("topleft", self, "topleft", 1, -((index-1)*(config.scroll_line_height+1)) - 1)
line:SetSize(config.scroll_width - 2, config.scroll_line_height)
line:SetScript("OnEnter", line_onenter)
line:SetScript("OnLeave", line_onleave)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack(config.backdrop_color))
local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
local questIDLabel = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
DF:SetFontSize(name, 10)
DF:SetFontSize(questIDLabel, 10)
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(config.scroll_line_height - 2, config.scroll_line_height - 2)
icon:SetTexCoord(.1, .9, .1, .9)
local add_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton")
add_button:SetSize(21, 21)
add_button:SetScript("OnClick", onclick_add_button)
add_button:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
add_button:SetPushedTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
add_button:GetNormalTexture():SetDesaturated(true)
add_button:GetPushedTexture():SetDesaturated(true)
add_button:GetPushedTexture():ClearAllPoints()
add_button:GetPushedTexture():SetPoint("center")
add_button:GetPushedTexture():SetSize(18, 18)
local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton")
remove_button:SetSize(21, 21)
remove_button:SetScript("OnClick", onclick_remove_button)
remove_button:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
remove_button:SetPushedTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
remove_button:GetPushedTexture():ClearAllPoints()
remove_button:GetPushedTexture():SetPoint("center")
remove_button:GetPushedTexture():SetSize(18, 18)
icon:SetPoint("left", line, "left", 2, 0)
name:SetPoint("left", icon, "right", 4, 0)
add_button:SetPoint("right", line, "right", -2, 0)
remove_button:SetPoint("right", line, "right", -2, 0)
questIDLabel:SetPoint("right", line, "right", -26, 0)
line.icon = icon
line.name = name
line.questIDLabel = questIDLabel
line.removebutton = remove_button
line.addbutton = add_button
return line
end
--create the scroll widgets
for i = 1, config.scroll_lines do
banQuestScroll:CreateLine(createLine, i)
end
--this build a list of quests and send it to the scroll
function f:UpdateQuestList()
--if this panel isn't shown, just quit, this can happen since some functions schedule a refresh on this frame
if (not f:IsShown()) then
return
end
local data = {}
local alreadyAdded = {}
local alreadyBanned = WorldQuestTracker.db.profile.banned_quests
for questID, _ in pairs(WorldQuestTracker.db.profile.banned_quests) do
if (not alreadyAdded [questID]) then
local title, factionID = WorldQuestTracker.GetOrLoadQuestData(questID)
if (title) then
table.insert(data, {title, questID, factionID, alreadyBanned [questID]})
alreadyAdded [questID] = true
end
end
end
for _, questID in ipairs(WorldQuestTracker.Cache_ShownQuestOnZoneMap) do
if (not alreadyAdded[questID]) then
local title, factionID = WorldQuestTracker.GetOrLoadQuestData(questID)
if (title) then
table.insert(data, {title, questID, factionID, alreadyBanned [questID]})
alreadyAdded[questID] = true
end
end
end
for _, questButton in pairs(WorldQuestTracker.WorldMapSmallWidgets) do
local questID = questButton.questID
if (questID) then
if (not alreadyAdded[questID]) then
local title, factionID = WorldQuestTracker.GetOrLoadQuestData(questID)
if (title) then
table.insert(data, {title, questID, factionID, alreadyBanned [questID]})
alreadyAdded[questID] = true
end
end
end
end
for _, summarySquare in ipairs(WorldQuestTracker.WorldSummaryQuestsSquares) do
local questID = summarySquare.questID
if (questID) then
if (not alreadyAdded[questID]) then
local title, factionID = WorldQuestTracker.GetOrLoadQuestData(questID)
if (title) then
table.insert(data, {title, questID, factionID, alreadyBanned [questID]})
alreadyAdded[questID] = true
end
end
end
end
banQuestScroll:SetData(data)
banQuestScroll:Refresh()
end
end
WorldQuestTrackerBanPanel:UpdateQuestList()
WorldQuestTrackerBanPanel:Show()
end
--go to broken isles button ~worldquestbutton ~worldmapbutton ~worldbutton
--create two world quest button, for alliance and horde
local toggleButtonsAlpha = 0.75
--user reported on this line "attempt to index a nil value": The following error message appears ONCE when opening the world map after logging in. It appears regardless of windowed or full screen world map. It does not appear again after closing and reopening the world map:
--looks like ElvUI removes the highlight texture from the button
local closeButtonHighlightTexture = WorldMapFrame.SidePanelToggle.CloseButton:GetHighlightTexture()
if (closeButtonHighlightTexture) then
closeButtonHighlightTexture:SetAlpha(toggleButtonsAlpha)
end
local openButtonHighlightTexture = WorldMapFrame.SidePanelToggle.OpenButton:GetHighlightTexture()
if (openButtonHighlightTexture) then
openButtonHighlightTexture:SetAlpha(toggleButtonsAlpha)
end
WorldMapFrame.SidePanelToggle.CloseButton:SetFrameLevel(anchorFrame:GetFrameLevel()+2)
WorldMapFrame.SidePanelToggle.OpenButton:SetFrameLevel(anchorFrame:GetFrameLevel()+2)
local navigateButtonsSize = {22, 30}
local navigateButtonsbackdropColor = {.2, .2, .2, .7}
local navigateButtonsBorderColor = {0, 0, .0, 1}
local navigateButtonsBackdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1}
--Alliance
--[=[
local AllianceWorldQuestButton = CreateFrame("button", "WorldQuestTrackerGoToAllianceButton", anchorFrame, "BackdropTemplate")
AllianceWorldQuestButton:SetSize(unpack(navigateButtonsSize))
AllianceWorldQuestButton:SetFrameLevel(WorldMapFrame.SidePanelToggle.CloseButton:GetFrameLevel())
AllianceWorldQuestButton:SetBackdrop(navigateButtonsBackdrop)
AllianceWorldQuestButton:SetBackdropBorderColor(unpack(navigateButtonsBorderColor))
AllianceWorldQuestButton:SetBackdropColor(unpack(navigateButtonsbackdropColor))
AllianceWorldQuestButton:SetNormalTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
AllianceWorldQuestButton:SetPushedTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
AllianceWorldQuestButton:GetNormalTexture():ClearAllPoints()
AllianceWorldQuestButton:GetNormalTexture():SetPoint("topleft", 1, -1)
AllianceWorldQuestButton:GetNormalTexture():SetPoint("bottomright", -1, 1)
AllianceWorldQuestButton:GetNormalTexture():SetTexCoord(64/256, 92/256, 0, 1)
AllianceWorldQuestButton.Highlight = AllianceWorldQuestButton:CreateTexture(nil, "highlight")
AllianceWorldQuestButton.Highlight:SetColorTexture(.9, .9, .9, .3)
AllianceWorldQuestButton.Highlight:SetBlendMode("ADD")
AllianceWorldQuestButton.Highlight:SetAlpha(toggleButtonsAlpha)
AllianceWorldQuestButton.Highlight:SetSize(unpack(navigateButtonsSize))
AllianceWorldQuestButton.Highlight:SetPoint("center")
AllianceWorldQuestButton:SetScript("OnClick", function()
WorldMapFrame:SetMapID(WorldQuestTracker.MapData.ZoneIDs.KULTIRAS)
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
WorldQuestTracker.AllianceWorldQuestButton_Click = GetTime()
end)
--Horde
local HordeWorldQuestButton = CreateFrame("button", "WorldQuestTrackerGoToHordeButton", anchorFrame, "BackdropTemplate")
HordeWorldQuestButton:SetSize(unpack(navigateButtonsSize))
HordeWorldQuestButton:SetFrameLevel(WorldMapFrame.SidePanelToggle.CloseButton:GetFrameLevel())
HordeWorldQuestButton:SetBackdrop(navigateButtonsBackdrop)
HordeWorldQuestButton:SetBackdropBorderColor(unpack(navigateButtonsBorderColor))
HordeWorldQuestButton:SetBackdropColor(unpack(navigateButtonsbackdropColor))
HordeWorldQuestButton:SetNormalTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
HordeWorldQuestButton:SetPushedTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
HordeWorldQuestButton:GetNormalTexture():ClearAllPoints()
HordeWorldQuestButton:GetNormalTexture():SetPoint("topleft", 1, -1)
HordeWorldQuestButton:GetNormalTexture():SetPoint("bottomright", -1, 1)
HordeWorldQuestButton:GetNormalTexture():SetTexCoord(32/256, 64/256, 0, 1)
HordeWorldQuestButton.Highlight = HordeWorldQuestButton:CreateTexture(nil, "highlight")
HordeWorldQuestButton.Highlight:SetColorTexture(.9, .9, .9, .3)
HordeWorldQuestButton.Highlight:SetBlendMode("ADD")
HordeWorldQuestButton.Highlight:SetAlpha(toggleButtonsAlpha)
HordeWorldQuestButton.Highlight:SetSize(unpack(navigateButtonsSize))
HordeWorldQuestButton.Highlight:SetPoint("center")
HordeWorldQuestButton:SetScript("OnClick", function()
WorldMapFrame:SetMapID(WorldQuestTracker.MapData.ZoneIDs.ZANDALAR)
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
WorldQuestTracker.HordeWorldQuestButton_Click = GetTime()
end)
--legion
local LegionWorldQuestButton = CreateFrame("button", "WorldQuestTrackerGoToLegionButton", anchorFrame, "BackdropTemplate")
LegionWorldQuestButton:SetSize(unpack(navigateButtonsSize))
LegionWorldQuestButton:SetFrameLevel(WorldMapFrame.SidePanelToggle.CloseButton:GetFrameLevel())
LegionWorldQuestButton:SetNormalTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
LegionWorldQuestButton:SetPushedTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
LegionWorldQuestButton:GetNormalTexture():ClearAllPoints()
LegionWorldQuestButton:GetNormalTexture():SetPoint("topleft", 1, -1)
LegionWorldQuestButton:GetNormalTexture():SetPoint("bottomright", -1, 1)
LegionWorldQuestButton:GetNormalTexture():SetTexCoord(32/256, 64/256, 0, 1)
LegionWorldQuestButton:SetBackdrop(navigateButtonsBackdrop)
LegionWorldQuestButton:SetBackdropBorderColor(unpack(navigateButtonsBorderColor))
LegionWorldQuestButton:SetBackdropColor(unpack(navigateButtonsbackdropColor))
LegionWorldQuestButton.Highlight = LegionWorldQuestButton:CreateTexture(nil, "highlight")
LegionWorldQuestButton.Highlight:SetColorTexture(.9, .9, .9, .3)
LegionWorldQuestButton.Highlight:SetBlendMode("ADD")
LegionWorldQuestButton.Highlight:SetAlpha(toggleButtonsAlpha)
LegionWorldQuestButton.Highlight:SetSize(unpack(navigateButtonsSize))
LegionWorldQuestButton.Highlight:SetPoint("center")
LegionWorldQuestButton:SetScript("OnClick", function()
WorldMapFrame:SetMapID(WorldQuestTracker.MapData.ZoneIDs.ZANDALAR)
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
WorldQuestTracker.LegionWorldQuestButton_Click = GetTime()
end)
--]=]
--azeroth
local AzerothWorldQuestButton = CreateFrame("button", "WorldQuestTrackerGoToAzerothButton", anchorFrame, "BackdropTemplate")
AzerothWorldQuestButton:SetSize(unpack(navigateButtonsSize))
AzerothWorldQuestButton:SetFrameLevel(WorldMapFrame.SidePanelToggle.CloseButton:GetFrameLevel())
AzerothWorldQuestButton:SetNormalTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
AzerothWorldQuestButton:SetPushedTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
local azerothIconIndex = 5
AzerothWorldQuestButton:GetNormalTexture():ClearAllPoints()
AzerothWorldQuestButton:GetNormalTexture():SetPoint("topleft", 1, -1)
AzerothWorldQuestButton:GetNormalTexture():SetPoint("bottomright", -1, 1)
AzerothWorldQuestButton:GetNormalTexture():SetTexCoord(((azerothIconIndex-1)*32)/256,(azerothIconIndex*32)/256, 0, 1)
AzerothWorldQuestButton:GetPushedTexture():ClearAllPoints()
AzerothWorldQuestButton:GetPushedTexture():SetPoint("topleft", 1, -1)
AzerothWorldQuestButton:GetPushedTexture():SetPoint("bottomright", -1, 1)
AzerothWorldQuestButton:GetPushedTexture():SetTexCoord(((azerothIconIndex-1)*32)/256,(azerothIconIndex*32)/256, 0, 1)
AzerothWorldQuestButton:SetBackdrop(navigateButtonsBackdrop)
AzerothWorldQuestButton:SetBackdropBorderColor(unpack(navigateButtonsBorderColor))
AzerothWorldQuestButton:SetBackdropColor(unpack(navigateButtonsbackdropColor))
AzerothWorldQuestButton.Highlight = AzerothWorldQuestButton:CreateTexture(nil, "highlight")
AzerothWorldQuestButton.Highlight:SetColorTexture(.9, .9, .9, .3)
AzerothWorldQuestButton.Highlight:SetBlendMode("ADD")
AzerothWorldQuestButton.Highlight:SetAlpha(toggleButtonsAlpha)
AzerothWorldQuestButton.Highlight:SetSize(unpack(navigateButtonsSize))
AzerothWorldQuestButton.Highlight:SetPoint("center")
AzerothWorldQuestButton:SetScript("OnClick", function()
WorldMapFrame:SetMapID(WorldQuestTracker.MapData.ZoneIDs.AZEROTH)
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
WorldQuestTracker.AzerothWorldQuestButton_Click = GetTime()
end)
--broken isles
local BrokenIslesWorldQuestButton = CreateFrame("button", "WorldQuestTrackerGoToBrokenIsles", anchorFrame, "BackdropTemplate")
BrokenIslesWorldQuestButton:SetSize(unpack(navigateButtonsSize))
BrokenIslesWorldQuestButton:SetFrameLevel(WorldMapFrame.SidePanelToggle.CloseButton:GetFrameLevel())
BrokenIslesWorldQuestButton:SetNormalTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
BrokenIslesWorldQuestButton:SetPushedTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
local brokenIslesIconIndex = 6
BrokenIslesWorldQuestButton:GetNormalTexture():ClearAllPoints()
BrokenIslesWorldQuestButton:GetNormalTexture():SetPoint("topleft", 1, -1)
BrokenIslesWorldQuestButton:GetNormalTexture():SetPoint("bottomright", -1, 1)
BrokenIslesWorldQuestButton:GetNormalTexture():SetTexCoord(((brokenIslesIconIndex-1)*32)/256,(brokenIslesIconIndex*32)/256, 0, 1)
BrokenIslesWorldQuestButton:GetPushedTexture():ClearAllPoints()
BrokenIslesWorldQuestButton:GetPushedTexture():SetPoint("topleft", 1, -1)
BrokenIslesWorldQuestButton:GetPushedTexture():SetPoint("bottomright", -1, 1)
BrokenIslesWorldQuestButton:GetPushedTexture():SetTexCoord(((brokenIslesIconIndex-1)*32)/256,(brokenIslesIconIndex*32)/256, 0, 1)
BrokenIslesWorldQuestButton:SetBackdrop(navigateButtonsBackdrop)
BrokenIslesWorldQuestButton:SetBackdropBorderColor(unpack(navigateButtonsBorderColor))
BrokenIslesWorldQuestButton:SetBackdropColor(unpack(navigateButtonsbackdropColor))
BrokenIslesWorldQuestButton.Highlight = BrokenIslesWorldQuestButton:CreateTexture(nil, "highlight")
BrokenIslesWorldQuestButton.Highlight:SetColorTexture(.9, .9, .9, .3)
BrokenIslesWorldQuestButton.Highlight:SetBlendMode("ADD")
BrokenIslesWorldQuestButton.Highlight:SetAlpha(toggleButtonsAlpha)
BrokenIslesWorldQuestButton.Highlight:SetSize(unpack(navigateButtonsSize))
BrokenIslesWorldQuestButton.Highlight:SetPoint("center")
BrokenIslesWorldQuestButton:SetScript("OnClick", function()
WorldMapFrame:SetMapID(WorldQuestTracker.MapData.ZoneIDs.BROKENISLES)
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
WorldQuestTracker.BrokenIslesWorldQuestButton_Click = GetTime()
end)
--shadowlands
local ShadowlandsWorldQuestButton = CreateFrame("button", "WorldQuestTrackerGoToShadowlandsButton", anchorFrame, "BackdropTemplate")
ShadowlandsWorldQuestButton:SetSize(unpack(navigateButtonsSize))
ShadowlandsWorldQuestButton:SetFrameLevel(WorldMapFrame.SidePanelToggle.CloseButton:GetFrameLevel())
ShadowlandsWorldQuestButton:SetNormalTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
ShadowlandsWorldQuestButton:SetPushedTexture([[Interface\AddOns\WorldQuestTracker\media\icon_worlds]])
local shadowlandsIconIndex = 1
ShadowlandsWorldQuestButton:GetNormalTexture():ClearAllPoints()
ShadowlandsWorldQuestButton:GetNormalTexture():SetPoint("topleft", 1, -1)
ShadowlandsWorldQuestButton:GetNormalTexture():SetPoint("bottomright", -1, 1)
ShadowlandsWorldQuestButton:GetNormalTexture():SetTexCoord(((shadowlandsIconIndex-1)*32)/256,(shadowlandsIconIndex*32)/256, 0, 1)
ShadowlandsWorldQuestButton:GetPushedTexture():ClearAllPoints()
ShadowlandsWorldQuestButton:GetPushedTexture():SetPoint("topleft", 1, -1)
ShadowlandsWorldQuestButton:GetPushedTexture():SetPoint("bottomright", -1, 1)
ShadowlandsWorldQuestButton:GetPushedTexture():SetTexCoord(((shadowlandsIconIndex-1)*32)/256,(shadowlandsIconIndex*32)/256, 0, 1)
ShadowlandsWorldQuestButton:SetBackdrop(navigateButtonsBackdrop)
ShadowlandsWorldQuestButton:SetBackdropBorderColor(unpack(navigateButtonsBorderColor))
ShadowlandsWorldQuestButton:SetBackdropColor(unpack(navigateButtonsbackdropColor))
ShadowlandsWorldQuestButton.Highlight = ShadowlandsWorldQuestButton:CreateTexture(nil, "highlight")
ShadowlandsWorldQuestButton.Highlight:SetColorTexture(.9, .9, .9, .3)
ShadowlandsWorldQuestButton.Highlight:SetBlendMode("ADD")
ShadowlandsWorldQuestButton.Highlight:SetAlpha(toggleButtonsAlpha)
ShadowlandsWorldQuestButton.Highlight:SetSize(unpack(navigateButtonsSize))
ShadowlandsWorldQuestButton.Highlight:SetPoint("center")
ShadowlandsWorldQuestButton:SetScript("OnClick", function()
WorldMapFrame:SetMapID(WorldQuestTracker.MapData.ZoneIDs.THESHADOWLANDS)
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
WorldQuestTracker.ShadowlandsWorldQuestButton_Click = GetTime()
end)
--arrange alliance and horde buttons
--LegionWorldQuestButton:SetPoint("right", WorldMapFrame.SidePanelToggle, "left", -1, -2)
--AllianceWorldQuestButton:SetPoint("right", LegionWorldQuestButton, "left", -1, 0)
--HordeWorldQuestButton:SetPoint("right", AllianceWorldQuestButton, "left", -1, 0)
--ShadowlandsWorldQuestButton:SetPoint("right", HordeWorldQuestButton, "left", -1, 0)
BrokenIslesWorldQuestButton:SetPoint("right", WorldMapFrame.SidePanelToggle, "left", -1, -1)
AzerothWorldQuestButton:SetPoint("right", BrokenIslesWorldQuestButton, "left", -1, 0)
ShadowlandsWorldQuestButton:SetPoint("right", AzerothWorldQuestButton, "left", -1, 0)
local locationAlphaButton = 0.75
BrokenIslesWorldQuestButton:SetAlpha(locationAlphaButton)
AzerothWorldQuestButton:SetAlpha(locationAlphaButton)
ShadowlandsWorldQuestButton:SetAlpha(locationAlphaButton)
--LegionWorldQuestButton:SetAlpha(.7)
--AllianceWorldQuestButton:SetAlpha(.7)
--HordeWorldQuestButton:SetAlpha(.7)
ShadowlandsWorldQuestButton:SetAlpha(.96)
function WorldQuestTracker.SetShownWorldShortcuts()
local bIsShown = WorldQuestTracker.db.profile.show_world_shortcuts
BrokenIslesWorldQuestButton:SetShown(bIsShown)
AzerothWorldQuestButton:SetShown(bIsShown)
ShadowlandsWorldQuestButton:SetShown(bIsShown)
WorldQuestTracker.ToggleQuestsSummaryButton:ClearAllPoints()
if (bIsShown) then
WorldQuestTracker.ToggleQuestsSummaryButton:SetPoint("bottomleft", ShadowlandsWorldQuestButton, "topleft", 0, 0)
else
WorldQuestTracker.ToggleQuestsSummaryButton:SetPoint("bottomright", WorldMapFrame.SidePanelToggle, "bottomleft", 0, 20)
end
end
--toggle between by zone and by type
local ToggleQuestsSummaryButton = CreateFrame("button", "WorldQuestTrackerToggleQuestsSummaryButton", anchorFrame, "BackdropTemplate")
WorldQuestTracker.ToggleQuestsSummaryButton = ToggleQuestsSummaryButton
ToggleQuestsSummaryButton:SetSize(100, 14)
ToggleQuestsSummaryButton:SetFrameLevel(1025)
ToggleQuestsSummaryButton.Highlight = ToggleQuestsSummaryButton:CreateTexture(nil, "highlight")
ToggleQuestsSummaryButton.Highlight:SetTexture([[Interface\Buttons\UI-Common-MouseHilight]])
ToggleQuestsSummaryButton.Highlight:SetBlendMode("ADD")
ToggleQuestsSummaryButton.Highlight:SetAlpha(toggleButtonsAlpha)
ToggleQuestsSummaryButton.Highlight:SetSize(128*1.5, 20*1.5)
ToggleQuestsSummaryButton.Highlight:SetPoint("center")
--create shadow below order by zone button
ToggleQuestsSummaryButton.ShadowBelow = ToggleQuestsSummaryButton:CreateTexture(nil, "border")
--ToggleQuestsSummaryButton.ShadowBelow:SetTexture([[Interface\ENCOUNTERJOURNAL\DungeonJournal]])
--ToggleQuestsSummaryButton.ShadowBelow:SetTexCoord(900/1024, 934/1024, 15/512, 46/512)
ToggleQuestsSummaryButton.ShadowBelow:SetPoint("left", ToggleQuestsSummaryButton, "left", 0, 0)
ToggleQuestsSummaryButton.ShadowBelow:SetSize(100, 13)
ToggleQuestsSummaryButton.TextLabel = DF:CreateLabel(ToggleQuestsSummaryButton, "Toggle Summary", DF:GetTemplate("font", "WQT_TOGGLEQUEST_TEXT"))
ToggleQuestsSummaryButton.TextLabel:SetPoint("center", ToggleQuestsSummaryButton, "center")
function ToggleQuestsSummaryButton:UpdateText()
if (WorldQuestTracker.db.profile.world_map_config.summary_showby == "byzone") then
--show by type
ToggleQuestsSummaryButton.TextLabel:SetText(L["S_WORLDBUTTONS_SHOW_TYPE"])
elseif (WorldQuestTracker.db.profile.world_map_config.summary_showby == "bytype") then
--show by zone
ToggleQuestsSummaryButton.TextLabel:SetText(L["S_WORLDBUTTONS_SHOW_ZONE"])
end
end
ToggleQuestsSummaryButton:SetScript("OnClick", function()
if (WorldQuestTracker.db.profile.world_map_config.summary_showby == "byzone") then
--show by type
WorldQuestTracker.db.profile.world_map_config.summary_show = true
WorldQuestTracker.db.profile.world_map_config.summary_showby = "bytype"
elseif (WorldQuestTracker.db.profile.world_map_config.summary_showby == "bytype") then
--show by zone
WorldQuestTracker.db.profile.world_map_config.summary_show = true
WorldQuestTracker.db.profile.world_map_config.summary_showby = "byzone"
end
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.DoAnimationsOnWorldMapWidgets = true
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true)
end
ToggleQuestsSummaryButton:UpdateText()
end)
ToggleQuestsSummaryButton:UpdateText()
ToggleQuestsSummaryButton:SetScript("OnMouseDown", function()
ToggleQuestsSummaryButton.TextLabel:SetPoint("center", ToggleQuestsSummaryButton, "center", -1, -1)
end)
ToggleQuestsSummaryButton:SetScript("OnMouseUp", function()
ToggleQuestsSummaryButton.TextLabel:SetPoint("center", ToggleQuestsSummaryButton, "center")
end)
ToggleQuestsSummaryButton:Hide()
WorldQuestTracker.SetShownWorldShortcuts()
-- �ptionsfunc ~optionsfunc
local options_on_click = function(_, _, option, value, value2, mouseButton)
if (option == "use_tracker") then
C_Timer.After(0, WorldQuestTracker.RefreshTrackerAnchor)
end
if (option == "accessibility") then
if (value == "extra_tracking_indicator") then
WorldQuestTracker.db.profile.accessibility.extra_tracking_indicator = value2
elseif (value == "use_bounty_ring") then
WorldQuestTracker.db.profile.accessibility.use_bounty_ring = value2
end
if (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneWidgets(true)
end
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap(true, true, false, true)
end
GameCooltip:Hide()
return
end
if (option == "pathdots") then
WorldQuestTracker.db.profile.path[value] = value2
GameCooltip:Hide()
return
end
if (option == "oribos_flight_master") then
WorldQuestTracker.db.profile.flymaster_tracker_enabled = not WorldQuestTracker.db.profile.flymaster_tracker_enabled
GameCooltip:Hide()
end
if (option == "talkinghead") then
if (value == "talking_heads_openworld") then
WorldQuestTracker.db.profile.talking_heads_openworld = not WorldQuestTracker.db.profile.talking_heads_openworld
elseif (value == "talking_heads_dungeon") then
WorldQuestTracker.db.profile.talking_heads_dungeon = not WorldQuestTracker.db.profile.talking_heads_dungeon
elseif (value == "talking_heads_raid") then
WorldQuestTracker.db.profile.talking_heads_raid = not WorldQuestTracker.db.profile.talking_heads_raid
elseif (value == "talking_heads_torgast") then
WorldQuestTracker.db.profile.talking_heads_torgast = not WorldQuestTracker.db.profile.talking_heads_torgast
end
GameCooltip:Hide()
return
end
if (option == "ignore_quest") then
WorldQuestTracker.OpenQuestBanPanel()
GameCooltip:Hide()
return
end
if (option == "bar_visible") then
WorldQuestTracker.db.profile.bar_visible = value
WorldQuestTracker.RefreshStatusBarVisibility()
GameCooltip:Hide()
WorldQuestTracker:Msg(L["S_MAPBAR_OPTIONSMENU_STATUSBAR_ONDISABLE"])
return
end
if (option == "emissary_quest_info") then
WorldQuestTracker.db.profile.show_emissary_info = value
GameCooltip:Hide()
if (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneSummaryFrame()
end
return
end
if (option == "show_summary_minimize_button") then
WorldQuestTracker.db.profile.show_summary_minimize_button = value
if (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneSummaryFrame()
end
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap()
end
WorldQuestTracker.ForceRefreshBountyBoard()
GameCooltip:Hide()
return
end
if (option == "world_map_config") then
if (value == "incsize") then
WorldQuestTracker.db.profile.world_map_config [value2] = WorldQuestTracker.db.profile.world_map_config [value2] + 0.05
WorldQuestTracker:Msg("- " .. WorldQuestTracker.db.profile.world_map_config [value2])
elseif (value == "decsize") then
WorldQuestTracker.db.profile.world_map_config [value2] = WorldQuestTracker.db.profile.world_map_config [value2] - 0.05
WorldQuestTracker:Msg("- " .. WorldQuestTracker.db.profile.world_map_config [value2])
elseif (value == "incrows") then
WorldQuestTracker.db.profile.world_map_config [value2] = WorldQuestTracker.db.profile.world_map_config [value2] + 1
WorldQuestTracker:Msg("- " .. WorldQuestTracker.db.profile.world_map_config [value2])
elseif (value == "decrows") then
WorldQuestTracker.db.profile.world_map_config [value2] = WorldQuestTracker.db.profile.world_map_config [value2] - 1
WorldQuestTracker:Msg("- " .. WorldQuestTracker.db.profile.world_map_config [value2])
else
WorldQuestTracker.db.profile.world_map_config [value] = value2
end
WorldQuestTracker.UpdateWorldQuestsOnWorldMap()
if (value == "onmap_show" or value == "summary_show" or value == "summary_anchor" or value == "summary_widgets_per_row") then
WorldQuestTracker.OnMapHasChanged()
GameCooltip:Close()
end
--old(perhaps deprecated)
if (value == "textsize") then
WorldQuestTracker.SetTextSize("WorldMap", value2)
elseif (value == "scale" or value == "quest_icons_scale_offset") then
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap()
end
elseif (value == "disable_world_map_widgets") then
WorldQuestTracker.db.profile.disable_world_map_widgets = value2
if (WorldQuestTracker.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap()
GameCooltip:Close()
end
end
return
elseif (option == "zone_map_config") then
if (value == "incsize") then
WorldQuestTracker.db.profile.zone_map_config [value2] = WorldQuestTracker.db.profile.zone_map_config [value2] + 0.05
WorldQuestTracker:Msg("- " .. WorldQuestTracker.db.profile.zone_map_config [value2])
--update if showing zone map
if (WorldQuestTracker.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneWidgets(true)
end
return
elseif (value == "decsize") then
WorldQuestTracker.db.profile.zone_map_config [value2] = WorldQuestTracker.db.profile.zone_map_config [value2] - 0.05
WorldQuestTracker:Msg("- " .. WorldQuestTracker.db.profile.zone_map_config [value2])
--update if showing zone map
if (WorldQuestTracker.GetCurrentZoneType() == "zone") then