forked from RestedXP/RXPGuides
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHardcoreIntroUI.lua
More file actions
executable file
·1656 lines (1506 loc) · 56.7 KB
/
Copy pathHardcoreIntroUI.lua
File metadata and controls
executable file
·1656 lines (1506 loc) · 56.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
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
local addonName, addon = ...
if addon.game ~= "CLASSIC" then return end
local L = addon.locale.Get
local default_x = 420
local default_y = -60
local finalizeSettings
local intro_animations = true
local HCmode = false
local dungeon_configuration_frame = nil
local dungeon_selection_frame = nil
addon.introUI = {}
--local dungeonIcons = {}
addon.dungeonScore = {}
addon.dungeonScoreSC = {}
for tag,dungeon in pairs(addon.dungeonStats[addon.player.faction]) do
local score = (dungeon.travel or 0) * 0.7 + (dungeon.quest or 0) * 1.2 + (dungeon[addon.player.class] or 0) * 1.4
addon.dungeonScore[tag] = score
--print(tag,addon.dungeonScore[tag])
end
for tag,dungeon in pairs(addon.dungeonStatsSC[addon.player.faction]) do
local score = (dungeon.travel or 0) * 0.7 + (dungeon.quest or 0) * 1.2 + (dungeon[addon.player.class] or 0) * 1.4
addon.dungeonScoreSC[tag] = score
--print(tag,addon.dungeonScore[tag])
end
if addon.player.faction == "Alliance" then
local class = addon.player.class
addon.dungeonScore["STOCKS"] = 9
addon.dungeonScoreSC["STOCKS"] = 9
addon.dungeonScore["ULDA"] = 9
addon.dungeonScoreSC["ULDA"] = 9
if class == "PALADIN" or class == "WARRIOR" then
addon.dungeonScore["SM"] = 9
addon.dungeonScoreSC["SM"] = 9
end
end
local dungeonScore = addon.dungeonScore
local dungeonStats = addon.dungeonStats
----------- Settings
-- Note: upon finishing the splash screen setup, RXPCData will be updated
-- RXPCData['hardcore_guide'] = {['enabled'] = 1}
local dungeons_enabled = false -- RXPCData['hardcore_guide']['dungeons_enabled'] =
local hostile_enemy_warning = false -- RXPCData['hardcore_guide']['hostile_enemy_warning'] =
local panic_mode = false -- RXPCData['hardcore_guide']['panic_mode'] =
local auction_house = false -- RXPCData['hardcore_guide']['auction_house'] =
local group_quests = false -- RXPCData['hardcore_guide']['group_quests'] =
local dungeons = {} -- RXPCData['hardcore_guide']['dungeons'] = {dungeon_title,...}
local dungeonConfigButton
local dungeonConfigButton2
----------- Widgets
local function createSubTitleFont(text, frame, x, y)
local font_string = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
font_string:SetPoint("CENTER", frame, "CENTER", x, y)
font_string:SetJustifyH("CENTER")
font_string:SetWidth(350)
font_string:SetTextColor(186 / 255, 186 / 255, 186 / 255)
font_string:SetFont("Interface\\Addons\\RXPGuides\\Fonts\\BerlinSansFBDemi-Bold_wide5.ttf", 16, "")
font_string:SetText(text)
font_string:Show()
end
local function createLargeTitleFont(text, frame, x, y)
local font_string = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
font_string:SetPoint("CENTER", frame, "CENTER", x, y)
font_string:SetJustifyH("CENTER")
font_string:SetWidth(350)
font_string:SetTextColor(186 / 255, 186 / 255, 186 / 255)
font_string:SetFont("Interface\\Addons\\RXPGuides\\Fonts\\BerlinSansFBDemi-Bold_wide5.ttf", 26, "OUTLINE")
font_string:SetText(text)
font_string:Show()
end
local function createDescriptionFont(text, frame, x, y)
local font_string = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
font_string:SetPoint("CENTER", frame, "CENTER", x, y)
font_string:SetJustifyH("CENTER")
font_string:SetWidth(350)
font_string:SetTextColor(145 / 255, 126 / 255, 97 / 255)
font_string:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
font_string:SetText(text)
font_string:Show()
end
local function createHardcoreUIFrame(
frame_width,
frame_height,
zoom,
background_cen_x,
background_cen_y,
parent,
parent_anchor,
frame_anchor,
x_off,
y_off,
level
)
local ratio = frame_height / frame_width
local frame = CreateFrame("frame","RXP_INTRO")
parent:HookScript("OnHide", function()
frame:Hide()
end)
frame:SetFrameLevel(level)
frame:SetPoint(frame_anchor, parent, parent_anchor, x_off, y_off)
frame:SetSize(frame_width, frame_height)
-- frame:SetMovable(true)
-- frame:EnableMouse(true)
frame:Show()
frame.textures = {}
local tex_coords = {
["background"] = {
background_cen_x - zoom / 2,
background_cen_x + zoom / 2,
background_cen_y - zoom / 2 * ratio,
background_cen_y + zoom / 2 * ratio,
},
["bottom_left_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["bottom_right_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["top_left_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["top_right_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["top_bar"] = { 0, 1, 1 - 0.0423, 1 - (0.0423 + 0.0423 / 2) },
["bottom_bar"] = { 0, 1, 1 - 0.0402 / 3, 1 - 0.0402 },
["right_bar"] = { 0.157, 0.157 + 0.0146, 1 - 0.298, 1 - (0.298 + 0.0307) },
["left_bar"] = { 0.171, 0.171 + 0.0146, 1 - 0.298, 1 - (0.298 + 0.0307) },
["skull_emblem"] = { 0.204, 0.204 + 0.0781, 1 - (0.348 + 0.0745), 1 - 0.348 },
["top_left_dia_chain"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_left_dia_chain2"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_left_dia_chain3"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_right_dia_chain"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_right_dia_chain2"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_right_dia_chain3"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_left_dia_chain_shadow"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_left_dia_chain2_shadow"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_left_dia_chain3_shadow"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_right_dia_chain_shadow"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_right_dia_chain2_shadow"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["top_right_dia_chain3_shadow"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_left_chain1"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_left_chain2"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_right_chain1"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_right_chain2"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
}
local tex_sizes = {
["background"] = { 1 * frame:GetWidth() / 375, 1 * frame:GetWidth() / 375 * ratio },
["bottom_left_corner"] = { 0.1, 0.1 },
["bottom_right_corner"] = { 0.1, 0.1 },
["top_left_corner"] = { 0.1, 0.1 },
["top_right_corner"] = { 0.1, 0.1 },
["top_bar"] = { 1 * frame:GetWidth() / 375, 0.0175 },
["bottom_bar"] = { 1 * frame:GetWidth() / 375, 0.0175 },
["left_bar"] = { 0.0175, 1 * ratio * frame:GetWidth() / 375 },
["right_bar"] = { 0.0175, 1 * ratio * frame:GetWidth() / 375 },
["skull_emblem"] = { 0.2, 0.2 },
["top_left_dia_chain"] = { 0.2, 0.2 },
["top_left_dia_chain2"] = { 0.2, 0.2 },
["top_left_dia_chain3"] = { 0.2, 0.2 },
["top_right_dia_chain"] = { 0.2, 0.2 },
["top_right_dia_chain2"] = { 0.2, 0.2 },
["top_right_dia_chain3"] = { 0.2, 0.2 },
["top_left_dia_chain_shadow"] = { 0.2, 0.2 },
["top_left_dia_chain2_shadow"] = { 0.2, 0.2 },
["top_left_dia_chain3_shadow"] = { 0.2, 0.2 },
["top_right_dia_chain_shadow"] = { 0.2, 0.2 },
["top_right_dia_chain2_shadow"] = { 0.2, 0.2 },
["top_right_dia_chain3_shadow"] = { 0.2, 0.2 },
["vert_left_chain1"] = { 0.2, 0.2 },
["vert_left_chain2"] = { 0.2, 0.2 },
["vert_right_chain1"] = { 0.2, 0.2 },
["vert_right_chain2"] = { 0.2, 0.2 },
}
local tex_rots = {
["background"] = 0,
["bottom_left_corner"] = 0,
["bottom_right_corner"] = 1.57,
["top_left_corner"] = 3.14 + 1.57,
["top_right_corner"] = 3.14,
["top_bar"] = 0,
["bottom_bar"] = 0,
["left_bar"] = 0,
["right_bar"] = 0,
["skull_emblem"] = 0,
["top_left_dia_chain"] = 0.6,
["top_left_dia_chain2"] = 0.6,
["top_right_dia_chain"] = -0.6 + 3.14 - 1.57,
["top_right_dia_chain2"] = -0.6 + 3.14 - 1.57,
["top_left_dia_chain_shadow"] = 0.6,
["top_left_dia_chain2_shadow"] = 0.6,
["top_right_dia_chain_shadow"] = -0.6 + 3.14 - 1.57,
["top_right_dia_chain2_shadow"] = -0.6 + 3.14 - 1.57,
["vert_left_chain1"] = -0.77 + 3.14,
["vert_left_chain2"] = -0.77 + 3.14,
["vert_right_chain1"] = -0.77 + 3.14,
["vert_right_chain2"] = -0.77 + 3.14,
}
local tex_anchors = {
["background"] = { "CENTER", "CENTER", 0, 0, 0 },
["bottom_left_corner"] = { "BOTTOMLEFT", "BOTTOMLEFT", -5, -5, 5 },
["bottom_right_corner"] = { "BOTTOMRIGHT", "BOTTOMRIGHT", 5, -5, 5 },
["top_left_corner"] = { "TOPLEFT", "TOPLEFT", -5, 5, 5 },
["top_right_corner"] = { "TOPRIGHT", "TOPRIGHT", 5, 5, 5 },
["top_bar"] = { "TOP", "TOP", 0, 0, 1 },
["bottom_bar"] = { "BOTTOM", "BOTTOM", 0, 0, 1 },
["left_bar"] = { "LEFT", "LEFT", 0, 0, 1 },
["right_bar"] = { "RIGHT", "RIGHT", 0, 0, 1 },
["skull_emblem"] = { "CENTER", "TOP", 0, -45, 6 },
["top_left_dia_chain"] = { "CENTER", "TOP", -140, -25, 4 },
["top_left_dia_chain2"] = {
"CENTER",
"TOP",
-140 + math.cos(0.4 - 0.21) * 70,
-25 - math.sin(0.4 - 0.21) * 70,
3,
},
["top_right_dia_chain"] = { "CENTER", "TOP", 140, -25, 4 },
["top_right_dia_chain2"] = {
"CENTER",
"TOP",
140 - math.cos(0.4 - 0.21) * 70,
-25 - math.sin(0.4 - 0.21) * 70,
3,
},
["top_left_dia_chain_shadow"] = { "CENTER", "TOP", -140, -25 - 8, 1 },
["top_left_dia_chain2_shadow"] = {
"CENTER",
"TOP",
-140 + math.cos(0.4 - 0.21) * 70,
-25 - math.sin(0.4 - 0.21) * 70 - 8,
1,
},
["top_right_dia_chain_shadow"] = { "CENTER", "TOP", 140, -25 - 8, 1 },
["top_right_dia_chain2_shadow"] = {
"CENTER",
"TOP",
140 - math.cos(0.4 - 0.21) * 70,
-25 - math.sin(0.4 - 0.21) * 70 - 8,
1,
},
["vert_left_chain1"] = { "BOTTOM", "TOPLEFT", 20, -10, 0 },
["vert_left_chain2"] = { "BOTTOM", "TOPLEFT", 20, 60, 0 },
["vert_right_chain1"] = { "BOTTOM", "TOPRIGHT", -20, -10, 0 },
["vert_right_chain2"] = { "BOTTOM", "TOPRIGHT", -20, 60, 0 },
}
local tex_colors = {
["top_left_dia_chain_shadow"] = { 0, 0, 0, 0.5 },
["top_left_dia_chain2_shadow"] = { 0, 0, 0, 0.5 },
["top_left_dia_chain3_shadow"] = { 0, 0, 0, 0.5 },
["top_right_dia_chain_shadow"] = { 0, 0, 0, 0.5 },
["top_right_dia_chain2_shadow"] = { 0, 0, 0, 0.5 },
["top_right_dia_chain3_shadow"] = { 0, 0, 0, 0.5 },
}
for _, v in ipairs({
"background",
"bottom_left_corner",
"bottom_right_corner",
"top_left_corner",
"top_right_corner",
"top_bar",
"bottom_bar",
"left_bar",
"right_bar",
"skull_emblem",
"top_left_dia_chain",
"top_left_dia_chain2",
"top_right_dia_chain",
"top_right_dia_chain2",
"top_left_dia_chain_shadow",
"top_left_dia_chain2_shadow",
"top_right_dia_chain_shadow",
"top_right_dia_chain2_shadow",
"vert_left_chain1",
"vert_left_chain2",
"vert_right_chain1",
"vert_right_chain2",
}) do
frame.textures[v] = frame:CreateTexture(nil, "OVERLAY")
local tex = frame.textures[v]
local coords = tex_coords[v]
local sizes = tex_sizes[v]
local rot = tex_rots[v]
local anchors = tex_anchors[v]
tex:SetPoint(anchors[1], frame, anchors[2], anchors[3], anchors[4])
tex:SetDrawLayer("OVERLAY", anchors[5])
tex:SetHeight(375 * sizes[2])
tex:SetWidth(375 * sizes[1])
tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\Hardcore\\intro_ui.tga")
tex:SetTexCoord(coords[1], coords[2], coords[3], coords[4])
tex:SetRotation(rot)
if tex_colors[v] then
tex:SetVertexColor(tex_colors[v][1], tex_colors[v][2], tex_colors[v][3], tex_colors[v][4])
end
end
frame.black_glow_tex = frame:CreateTexture(nil, "OVERLAY")
local tex = frame.black_glow_tex
tex:SetPoint("CENTER", frame, "CENTER", 0, 0)
tex:SetDrawLayer("OVERLAY", -1)
tex:SetHeight(frame:GetHeight() * 1.1)
tex:SetWidth(frame:GetWidth() * 1.1)
tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\blur_box.blp")
tex:SetVertexColor(0, 0, 0, 1)
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnDragStart", function(self, button)
self:StartMoving()
end)
frame:SetScript("OnDragStop", function(self)
self:StopMovingOrSizing()
end)
local function addCloudFX()
local other_tex = frame:CreateTexture(nil, "OVERLAY")
other_tex:SetDrawLayer("OVERLAY", 1)
other_tex:SetHeight(frame:GetHeight())
other_tex:SetPoint("CENTER", frame, "CENTER", 0, 0)
other_tex:SetWidth(frame:GetWidth())
other_tex:SetTexture("Interface\\Glues\\Models\\UI_Orc\\Cloud_Puffy_Mod.PNG")
other_tex:SetVertexColor(1, 1, 1, 0.07)
other_tex:SetTexCoord(0.5, 0.8, 0.5, 0.8)
other_tex:Show()
local c = random(-3.14, 3.14)
local function iterateAnimation()
c = c + 0.02
local xmod = math.cos(c) / 10.0
local ymod = math.sin(c / 2) / 20.0
other_tex:SetTexCoord(0.5 + xmod, 0.8 + xmod, 0.5 + ymod, 0.8 + ymod)
end
local timer_handle = C_Timer.NewTicker(1 / 15, iterateAnimation)
frame:HookScript("OnShow", function()
if timer_handle then
timer_handle:Cancel()
end
timer_handle = C_Timer.NewTicker(1 / 15, iterateAnimation)
end)
frame:HookScript("OnHide", function()
if timer_handle then
timer_handle:Cancel()
end
end)
end
addCloudFX()
frame:HookScript("OnShow", function()
local _y_off = y_off + 500
local _y_vel = -20
frame:SetPoint(frame_anchor, parent, parent_anchor, x_off, _y_off)
local timer_handle = C_Timer.NewTicker(1 / 60, function(self)
_y_vel = _y_vel - 4
_y_off = _y_off + _y_vel
if _y_off < y_off then
_y_off = y_off
-- PlaySound(968)
self:Cancel()
end
frame:SetPoint(frame_anchor, parent, parent_anchor, x_off, _y_off)
end)
end)
return frame
end
local optionIndex = 0
local function addHardcoreOptionButton(frame, title_text, description_text, tex_id, y_off, functor)
local height = 50
local width = 275
local _ratio = height / width
optionIndex = optionIndex + 1
local hardcore_option_button_frame = CreateFrame("frame", "$parent_option" .. optionIndex, frame, "BackdropTemplate")
hardcore_option_button_frame:SetPoint("TOP", frame, "TOP", 10, y_off)
hardcore_option_button_frame:SetSize(width, height)
hardcore_option_button_frame:EnableMouse(true)
hardcore_option_button_frame:Show()
local circle_frame_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
circle_frame_tex:SetDrawLayer("OVERLAY", 3)
circle_frame_tex:SetHeight(hardcore_option_button_frame:GetHeight())
circle_frame_tex:SetPoint("CENTER", hardcore_option_button_frame, "LEFT", 0, 0)
circle_frame_tex:SetWidth(hardcore_option_button_frame:GetHeight())
circle_frame_tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\Hardcore\\intro_ui.tga")
circle_frame_tex:SetVertexColor(1, 1, 1, 1)
circle_frame_tex:SetTexCoord(0.284, 0.284 + 0.0781, 1 - (0.348 + 0.0745), 1 - 0.348)
circle_frame_tex:Show()
local logo_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
logo_tex:SetDrawLayer("OVERLAY", 4)
logo_tex:SetHeight(circle_frame_tex:GetHeight() * 0.85)
logo_tex:SetPoint("CENTER", circle_frame_tex, "CENTER", 0, 1)
logo_tex:SetWidth(circle_frame_tex:GetWidth() * 0.85)
logo_tex:SetTexture(tex_id)
logo_tex:SetVertexColor(1, 1, 1, 1)
logo_tex:Show()
local logo_mask = hardcore_option_button_frame:CreateMaskTexture()
logo_mask:SetPoint("CENTER", logo_tex, "CENTER", 0, 0)
logo_mask:SetHeight(logo_tex:GetWidth() * 0.93)
logo_mask:SetWidth(logo_tex:GetWidth() * 0.93)
logo_mask:SetTexture(
"Interface\\Addons\\RXPGuides\\Textures\\blur_mask.blp",
"CLAMPTOBLACKADDITIVE",
"CLAMPTOBLACKADDITIVE"
)
logo_tex:AddMaskTexture(logo_mask)
hardcore_option_button_frame:SetBackdrop({
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
hardcore_option_button_frame:SetBackdropColor(14 / 255, 10 / 255, 7 / 255, 1.0)
hardcore_option_button_frame:SetBackdropBorderColor(112 / 255, 112 / 255, 112 / 255)
local function addOptionButtonTitle(title_text)
local font_string = hardcore_option_button_frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
font_string:SetDrawLayer("OVERLAY", 7)
font_string:SetPoint("TOP", hardcore_option_button_frame, "TOP", 5, -5)
font_string:SetJustifyH("LEFT")
font_string:SetWidth(hardcore_option_button_frame:GetWidth() * 0.79)
font_string:SetTextColor(0.8, 0.8, 0.8, 1)
font_string:SetFont("Fonts\\blei00d.TTF", 15, "")
font_string:SetText(title_text)
font_string:Show()
return font_string
end
local function addOptionDescription(description_text)
local font_string = hardcore_option_button_frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
font_string:SetDrawLayer("OVERLAY", 7)
font_string:SetPoint("TOP", hardcore_option_button_frame, "TOP", 5, -20)
font_string:SetJustifyH("LEFT")
font_string:SetWidth(hardcore_option_button_frame:GetWidth() * 0.79)
font_string:SetTextColor(210 / 255, 180 / 255, 140 / 255, 1)
font_string:SetFont("Fonts\\blei00d.TTF", 11, "THICK")
font_string:SetText(description_text)
font_string:Show()
return font_string
end
local title = addOptionButtonTitle(title_text)
local description = addOptionDescription(description_text)
height = math.max(title:GetStringHeight() + description:GetStringHeight() + 10,35)
--print('h:',height)
if height > 71 then
height = 71
end
hardcore_option_button_frame:SetHeight(height)
local transparent_paper = hardcore_option_button_frame:CreateTexture(nil, "ARTWORK")
transparent_paper:SetDrawLayer("OVERLAY", 1)
transparent_paper:SetHeight(hardcore_option_button_frame:GetHeight() - 5)
transparent_paper:SetPoint("CENTER", hardcore_option_button_frame, "CENTER", 0, 0)
transparent_paper:SetWidth(hardcore_option_button_frame:GetWidth() - 5)
transparent_paper:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\transparent_paper.blp")
transparent_paper:SetVertexColor(1, 1, 1, 1)
transparent_paper:SetTexCoord(0, 1, 0, 1 * _ratio)
transparent_paper:Show()
local check_circle_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
check_circle_tex:SetDrawLayer("OVERLAY", 3)
check_circle_tex:SetHeight(hardcore_option_button_frame:GetHeight() * 0.3)
check_circle_tex:SetPoint("CENTER", hardcore_option_button_frame, "RIGHT", -15, 0)
check_circle_tex:SetWidth(hardcore_option_button_frame:GetHeight() * 0.3)
check_circle_tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\Hardcore\\intro_ui.tga")
check_circle_tex:SetVertexColor(1, 1, 1, 1)
check_circle_tex:SetTexCoord(0.284, 0.284 + 0.0781, 1 - (0.348 + 0.0745), 1 - 0.348)
check_circle_tex:Show()
local check_mark_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
check_mark_tex:SetDrawLayer("OVERLAY", 6)
check_mark_tex:SetHeight(check_circle_tex:GetHeight() * 0.8)
check_mark_tex:SetPoint("CENTER", check_circle_tex, "CENTER", 0, 0)
check_mark_tex:SetWidth(check_circle_tex:GetHeight() * 0.8)
check_mark_tex:SetTexture("Interface\\RAIDFRAME/ReadyCheck-Ready.PNG")
check_mark_tex:Hide()
hardcore_option_button_frame.check_mark_tex = check_mark_tex
local button_selected_glow = frame:CreateTexture(nil, "OVERLAY")
button_selected_glow:SetDrawLayer("OVERLAY", 6)
button_selected_glow:SetHeight(height + 3)
button_selected_glow:SetPoint("CENTER", hardcore_option_button_frame, "CENTER", 0, 0)
button_selected_glow:SetWidth(290)
button_selected_glow:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\blur_box.blp")
button_selected_glow:SetTexCoord(0, 1, 0, 1)
button_selected_glow:SetVertexColor(0, 1, 0, 0.5)
button_selected_glow:Hide()
hardcore_option_button_frame.button_selected_glow = button_selected_glow
hardcore_option_button_frame:HookScript("OnMouseDown", function(self)
if check_mark_tex:IsShown() then
check_mark_tex:Hide()
else
check_mark_tex:Show()
end
if button_selected_glow:IsShown() then
button_selected_glow:Hide()
else
button_selected_glow:Show()
end
if functor then
functor(self)
else
print("Not hooked yet")
end
end)
return hardcore_option_button_frame:GetHeight(), hardcore_option_button_frame
end
local dungeon_count = 0
local function addHardcoreDungeonOptionButton(frame, title_text, level_range, tex_id, x_off, y_off, zone, tex_coord)
if not dungeonStats[addon.player.faction][title_text] then
return
end
local height = 50
local width = 275
local _ratio = height / width
dungeon_count = dungeon_count + 1
local hardcore_option_button_frame = CreateFrame("frame", "$parent_dungeon" .. optionIndex, frame, "BackdropTemplate")
hardcore_option_button_frame:SetPoint("TOP", frame, "TOP", x_off, y_off)
hardcore_option_button_frame:SetSize(width, height)
hardcore_option_button_frame:EnableMouse(true)
hardcore_option_button_frame:Show()
local button_selected_glow = frame:CreateTexture(nil, "OVERLAY")
button_selected_glow:SetDrawLayer("OVERLAY", 6)
button_selected_glow:SetHeight(53)
button_selected_glow:SetPoint("CENTER", hardcore_option_button_frame, "CENTER", 0, 0)
button_selected_glow:SetWidth(290)
button_selected_glow:SetTexture("Interface\\PetBattles/PetBattle-SelectedPetGlow.PNG")
button_selected_glow:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\blur_box.blp")
button_selected_glow:SetVertexColor(0, 1, 0, 0.5)
button_selected_glow:Hide()
local circle_frame_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
circle_frame_tex:SetDrawLayer("OVERLAY", 3)
circle_frame_tex:SetHeight(hardcore_option_button_frame:GetHeight())
circle_frame_tex:SetPoint("CENTER", hardcore_option_button_frame, "LEFT", 0, 0)
circle_frame_tex:SetWidth(hardcore_option_button_frame:GetHeight())
circle_frame_tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\Hardcore\\intro_ui.tga")
circle_frame_tex:SetVertexColor(1, 1, 1, 1)
circle_frame_tex:SetTexCoord(0.284, 0.284 + 0.0781, 1 - (0.348 + 0.0745), 1 - 0.348)
circle_frame_tex:Show()
local logo_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
logo_tex:SetDrawLayer("OVERLAY", 3)
logo_tex:SetHeight(circle_frame_tex:GetHeight() * 0.85)
logo_tex:SetPoint("CENTER", circle_frame_tex, "CENTER", 0, 1)
logo_tex:SetWidth(circle_frame_tex:GetWidth() * 0.85)
logo_tex:SetTexture(tex_id)
if tex_coord then
logo_tex:SetTexCoord(unpack(tex_coord))
end
logo_tex:SetVertexColor(1, 1, 1, 1)
logo_tex:Show()
logo_mask = hardcore_option_button_frame:CreateMaskTexture()
logo_mask:SetPoint("CENTER", logo_tex, "CENTER", 0, 0)
logo_mask:SetHeight(logo_tex:GetWidth() * 0.93)
logo_mask:SetWidth(logo_tex:GetWidth() * 0.93)
logo_mask:SetTexture(
"Interface\\Addons\\RXPGuides\\Textures\\blur_mask.blp",
"CLAMPTOBLACKADDITIVE",
"CLAMPTOBLACKADDITIVE"
)
logo_tex:AddMaskTexture(logo_mask)
hardcore_option_button_frame:SetBackdrop({
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
hardcore_option_button_frame:SetBackdropColor(14 / 255, 10 / 255, 7 / 255, 1)
hardcore_option_button_frame:SetBackdropBorderColor(112 / 255, 112 / 255, 112 / 255)
local transparent_paper = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
transparent_paper:SetDrawLayer("OVERLAY", 1)
transparent_paper:SetHeight(hardcore_option_button_frame:GetHeight() - 5)
transparent_paper:SetPoint("CENTER", hardcore_option_button_frame, "CENTER", 0, 0)
transparent_paper:SetWidth(hardcore_option_button_frame:GetWidth() - 5)
transparent_paper:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\transparent_paper.blp")
transparent_paper:SetVertexColor(1, 1, 1, 1)
transparent_paper:SetTexCoord(0, 1, 0, 1 * _ratio)
transparent_paper:Show()
local dungeonName = select(1,addon.GetDungeonName(title_text))
local function addOptionTitle(title_text)
local font_string = hardcore_option_button_frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
font_string:SetDrawLayer("OVERLAY", 5)
font_string:SetPoint("TOP", hardcore_option_button_frame, "TOP", 5, -5)
font_string:SetJustifyH("LEFT")
font_string:SetWidth(hardcore_option_button_frame:GetWidth() * 0.79)
font_string:SetTextColor(0.8, 0.8, 0.8)
font_string:SetFont("Fonts\\blei00d.TTF", 15, "")
font_string:SetText(
dungeonName .. " (|cffffa500" .. level_range[1] .. "|r - |cff228B22" .. level_range[2] .. "|r)"
)
font_string:Show()
end
local check_circle_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
check_circle_tex:SetDrawLayer("OVERLAY", 3)
check_circle_tex:SetHeight(hardcore_option_button_frame:GetHeight() * 0.3)
check_circle_tex:SetPoint("CENTER", hardcore_option_button_frame, "RIGHT", -15, 0)
check_circle_tex:SetWidth(hardcore_option_button_frame:GetHeight() * 0.3)
check_circle_tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\Hardcore\\intro_ui.tga")
check_circle_tex:SetVertexColor(1, 1, 1, 1)
check_circle_tex:SetTexCoord(0.284, 0.284 + 0.0781, 1 - (0.348 + 0.0745), 1 - 0.348)
check_circle_tex:Show()
hardcore_option_button_frame.check_circle_tex = check_circle_tex
local check_mark_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
check_mark_tex:SetDrawLayer("OVERLAY", 6)
check_mark_tex:SetHeight(check_circle_tex:GetHeight() * 0.8)
check_mark_tex:SetPoint("CENTER", check_circle_tex, "CENTER", 0, 0)
check_mark_tex:SetWidth(check_circle_tex:GetHeight() * 0.8)
check_mark_tex:SetTexture("Interface\\RAIDFRAME/ReadyCheck-Ready.PNG")
check_mark_tex:Hide()
hardcore_option_button_frame.check_mark_tex = check_mark_tex
local function tpOnEnter(self)
if self:IsForbidden() or _G.GameTooltip:IsForbidden() then
return
end
_G.GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT", 5, 50)
_G.GameTooltip:ClearLines()
_G.GameTooltip:AddLine(self.dungeonName, 1, 1, 1)
_G.GameTooltip:AddLine(self.tooltip, 1, 1, 1)
_G.GameTooltip:Show()
end
local function tpOnLeave(self)
if self:IsForbidden() or _G.GameTooltip:IsForbidden() then
return
end
_G.GameTooltip:Hide()
end
hardcore_option_button_frame.dungeonName = dungeonName
hardcore_option_button_frame:SetScript("OnEnter", tpOnEnter)
hardcore_option_button_frame:SetScript("OnLeave", tpOnLeave)
local x_off = -90
--local dungeon = dungeonStats[addon.player.faction][title_text]
local function process_icon(icon,v)
if icon then
local label = title_text .. icon
local logo_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
--print(title_text,'ok')
--dungeonIcons[label] = logo_tex
--logo_tex:ClearAllPoints()
logo_tex:SetDrawLayer("OVERLAY", 3)
logo_tex:SetHeight(circle_frame_tex:GetHeight() * 0.46)
logo_tex:SetPoint("CENTER", hardcore_option_button_frame, "CENTER", x_off, -8)
logo_tex:SetWidth(circle_frame_tex:GetWidth() * 0.46)
logo_tex:SetTexture(icon)
logo_tex:Show()
if v <= 1 then
logo_tex:SetDesaturated(1)
end
label = label .. 's'
if v == 3 then
local star_logo = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
--icon.star = star_logo
--star_logo:ClearAllPoints()
star_logo:SetDrawLayer("OVERLAY", 4)
star_logo:SetHeight(circle_frame_tex:GetHeight() * 0.26)
star_logo:SetPoint("CENTER", hardcore_option_button_frame, "CENTER", x_off + 9, 0)
star_logo:SetWidth(circle_frame_tex:GetWidth() * 0.26)
star_logo:SetTexture("Interface\\COMMON/ReputationStar.PNG")
star_logo:SetTexCoord(0, 0.5, 0, 0.5)
star_logo:Show()
end
x_off = x_off + 24
end
end
local dungeon = dungeonStats[addon.player.faction][title_text]
local tooltip = L"Location: " .. C_Map.GetAreaInfo(zone) .. "\n"
for k,v in pairs(dungeon) do
local icon = addon.dungeonIcons[k]
icon = icon or k == addon.player.class and addon.dungeonIcons.loot
process_icon(icon,v)
if icon then
tooltip = tooltip .. "\n|T" .. icon .. ":0|t " .. format(addon.dungeonTooltip[k],addon.dungeonWeights[v])
end
end
local profession = addon.dungeonProfessions[title_text]
if profession then
tooltip = tooltip .. L"\n\nProfessions that benefit:"
for k,v in pairs(profession) do
local icon = addon.dungeonIcons[k]
process_icon(icon,v)
tooltip = tooltip .. "\n|T" .. icon .. ":0|t " .. L(k)
end
end
hardcore_option_button_frame.tooltip = tooltip
hardcore_option_button_frame.select = function(self,state)
if state == nil then
state = not self.state
end
self.state = state
if not state then
check_mark_tex:Hide()
dungeons[title_text] = nil
button_selected_glow:Hide()
if dungeonConfigButton then
dungeonConfigButton.state = false
dungeonConfigButton.button_selected_glow:Hide()
dungeonConfigButton.check_mark_tex:Hide()
end
else
check_mark_tex:Show()
dungeons[title_text] = 1
button_selected_glow:Show()
end
if dungeonConfigButton2 and not dungeonConfigButton2.lock then
dungeonConfigButton2.state = false
dungeonConfigButton2.button_selected_glow:Hide()
dungeonConfigButton2.check_mark_tex:Hide()
end
if functor then
functor()
end
end
hardcore_option_button_frame:HookScript("OnMouseDown", function(self)
self:select()
end)
addOptionTitle(title_text)
hardcore_option_button_frame.title = title_text
return hardcore_option_button_frame
end
local function RXP_loadUltimateHardcoreSurvivalGuideFrame(survival_guide_functor)
local frame = createHardcoreUIFrame(375, 320, 0.3, 0.5, 0.3, UIParent, "TOP", "TOP", default_x, default_y, 1)
local function addSurvivalGuideButton()
local button = CreateFrame("Button", nil, frame)
button:SetPoint("CENTER", frame, "CENTER", 0, -130)
button:SetWidth(165)
button:SetHeight(35)
button:SetText("Select Survival Guide")
button:SetNormalFontObject("GameFontNormal")
local ntex = button:CreateTexture()
ntex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
ntex:SetTexCoord(0, 0.625, 0, 0.6875)
ntex:SetAllPoints()
button:SetNormalTexture(ntex)
local htex = button:CreateTexture()
htex:SetTexture("Interface/Buttons/UI-Panel-Button-Highlight")
htex:SetTexCoord(0, 0.625, 0, 0.6875)
htex:SetAllPoints()
button:SetHighlightTexture(htex)
local ptex = button:CreateTexture()
ptex:SetTexture("Interface/Buttons/UI-Panel-Button-Down")
ptex:SetTexCoord(0, 0.625, 0, 0.6875)
ptex:SetAllPoints()
button:SetPushedTexture(ptex)
button:SetScript("OnClick", function()
if survival_guide_functor then
survival_guide_functor()
end
HCmode = true
dungeonScore = addon.dungeonScore
dungeonStats = addon.dungeonStats
frame:Hide()
end)
return button
end
local function addNewFeatureButton()
local button = CreateFrame("Button", nil, frame)
button:SetPoint("CENTER", frame, "TOP", 0, -125)
button:SetWidth(165)
button:SetHeight(35)
local font_string = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
font_string:SetJustifyH("CENTER")
font_string:SetWidth(350)
font_string:SetTextColor(186 / 255, 186 / 255, 186 / 255)
font_string:SetFont("Interface\\Addons\\RXPGuides\\Fonts\\BerlinSansFBDemi-Bold_wide5.ttf", 14, "OUTLINE, THICK")
font_string:SetText("NEW FEATURE")
button:SetFontString(font_string)
--[[local ntex = button:CreateTexture()
ntex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
ntex:SetTexCoord(0, 0.625, 0, 0.6875)
ntex:SetAllPoints()
button:SetNormalTexture(ntex)]]
button:EnableMouse(false)
return button
end
local function addTitleFont()
createLargeTitleFont("ULTIMATE HARDCORE\nSURVIVAL GUIDE", frame, 0, -15)
end
local function addDescriptionFont()
createDescriptionFont(
L"Check out the new Ultimate Hardcore Surivival Guide,\nspecifically crafted to level your character as safe as\n possible. |cff228B22Including new features.|r",
frame,
0,
-70
)
end
local survival_guide_button = addSurvivalGuideButton()
addNewFeatureButton()
addTitleFont()
addDescriptionFont()
return frame
end
local function RXP_loadSpeedRunGuideSelector(parent_frame, background_cen_x, background_cen_y, zoom, selectSpeedrunFunctor)
local frame_width = parent_frame:GetWidth()
local frame_height = 220
local ratio = frame_height / frame_width
local frame = CreateFrame("frame")
parent_frame:HookScript("OnShow", function()
frame:Show()
end)
parent_frame:HookScript("OnHide", function()
frame:Hide()
end)
frame:SetPoint("TOP", parent_frame, "BOTTOM", 0, -40)
frame:SetSize(frame_width, frame_height)
frame:Show()
frame.textures = {}
background_cen_x = background_cen_x + 0.492 + 0.508 / 2
background_cen_y = 1 - (background_cen_y + 0.110 + 0.286 / 2)
local tex_coords = {
["background"] = {
background_cen_x - zoom / 2,
background_cen_x + zoom / 2,
background_cen_y - zoom / 2 * ratio,
background_cen_y + zoom / 2 * ratio,
},
["bottom_left_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["bottom_right_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["top_left_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["top_right_corner"] = { 0, 0.156, 1 - 0.272, 1 - (0.272 + 0.15) },
["top_bar"] = { 0, 1, 1 - 0.0423, 1 - (0.0423 + 0.0423 / 2) },
["bottom_bar"] = { 0, 1, 1 - 0.0402 / 3, 1 - 0.0402 },
["right_bar"] = { 0.157, 0.157 + 0.0146, 1 - 0.298, 1 - (0.298 + 0.0307) },
["left_bar"] = { 0.171, 0.171 + 0.0146, 1 - 0.298, 1 - (0.298 + 0.0307) },
["vert_left_chain1"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_left_chain2"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_right_chain1"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
["vert_right_chain2"] = { 0.279, 0.279 + 0.211, 1 - (0.0727 + 0.273), 1 - 0.0727 },
}
local tex_sizes = {
["background"] = { 1, 1 * ratio },
["bottom_left_corner"] = { 0.1, 0.1 },
["bottom_right_corner"] = { 0.1, 0.1 },
["top_left_corner"] = { 0.1, 0.1 },
["top_right_corner"] = { 0.1, 0.1 },
["top_bar"] = { 1, 0.0175 },
["bottom_bar"] = { 1, 0.0175 },
["left_bar"] = { 0.0175, 1 * ratio },
["right_bar"] = { 0.0175, 1 * ratio },
["vert_left_chain1"] = { 0.2, 0.2 },
["vert_left_chain2"] = { 0.2, 0.2 },
["vert_right_chain1"] = { 0.2, 0.2 },
["vert_right_chain2"] = { 0.2, 0.2 },
}
local tex_rots = {
["background"] = 0,
["bottom_left_corner"] = 0,
["bottom_right_corner"] = 1.57,
["top_left_corner"] = 3.14 + 1.57,
["top_right_corner"] = 3.14,
["top_bar"] = 0,
["bottom_bar"] = 0,
["left_bar"] = 0,
["right_bar"] = 0,
["vert_left_chain1"] = -0.77 + 3.14,
["vert_left_chain2"] = -0.77 + 3.14,
["vert_right_chain1"] = -0.77 + 3.14,
["vert_right_chain2"] = -0.77 + 3.14,
}
local tex_anchors = {
["background"] = { "CENTER", "CENTER", 0, 0, 0 },
["bottom_left_corner"] = { "BOTTOMLEFT", "BOTTOMLEFT", -5, -5, 5 },
["bottom_right_corner"] = { "BOTTOMRIGHT", "BOTTOMRIGHT", 5, -5, 5 },
["top_left_corner"] = { "TOPLEFT", "TOPLEFT", -5, 5, 5 },
["top_right_corner"] = { "TOPRIGHT", "TOPRIGHT", 5, 5, 5 },
["top_bar"] = { "TOP", "TOP", 0, 0, 1 },
["bottom_bar"] = { "BOTTOM", "BOTTOM", 0, 0, 1 },
["left_bar"] = { "LEFT", "LEFT", 0, 0, 1 },
["right_bar"] = { "RIGHT", "RIGHT", 0, 0, 1 },
["vert_left_chain1"] = { "BOTTOM", "TOPLEFT", 20, -10, 0 },
["vert_left_chain2"] = { "BOTTOM", "TOPLEFT", 20, 60, 0 },
["vert_right_chain1"] = { "BOTTOM", "TOPRIGHT", -20, -10, 0 },
["vert_right_chain2"] = { "BOTTOM", "TOPRIGHT", -20, 60, 0 },
}
local tex_colors = {}
for _, v in ipairs({
"background",
"bottom_left_corner",
"bottom_right_corner",
"top_left_corner",
"top_right_corner",
"top_bar",
"bottom_bar",
"left_bar",
"right_bar",
"vert_left_chain1",
"vert_left_chain2",
"vert_right_chain1",
"vert_right_chain2",
}) do
frame.textures[v] = frame:CreateTexture(nil, "OVERLAY")
local tex = frame.textures[v]
local coords = tex_coords[v]
local sizes = tex_sizes[v]
local rot = tex_rots[v]
local anchors = tex_anchors[v]
tex:SetPoint(anchors[1], frame, anchors[2], anchors[3], anchors[4])
tex:SetDrawLayer("OVERLAY", anchors[5])
tex:SetHeight(frame:GetWidth() * sizes[2])
tex:SetWidth(frame:GetWidth() * sizes[1])
tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\Hardcore\\intro_ui.tga")
tex:SetTexCoord(coords[1], coords[2], coords[3], coords[4])
tex:SetRotation(rot)
if tex_colors[v] then
tex:SetVertexColor(tex_colors[v][1], tex_colors[v][2], tex_colors[v][3], tex_colors[v][4])
end
end
frame.black_glow_tex = frame:CreateTexture(nil, "OVERLAY")
local tex = frame.black_glow_tex
tex:SetPoint("CENTER", frame, "CENTER", 0, 0)
tex:SetDrawLayer("OVERLAY", -1)
tex:SetHeight(frame:GetHeight() * 1.1)
tex:SetWidth(frame:GetWidth() * 1.1)
tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\blur_box.blp")
tex:SetVertexColor(0, 0, 0, 1)
rxp_logo_tex = frame:CreateTexture(nil, "OVERLAY")
rxp_logo_tex:SetPoint("CENTER", frame, "TOP", 0, -5)
rxp_logo_tex:SetDrawLayer("OVERLAY", 7)
rxp_logo_tex:SetHeight(frame:GetWidth() * 0.12)
rxp_logo_tex:SetWidth(frame:GetWidth() * 0.12)
rxp_logo_tex:SetTexture("Interface\\Addons\\RXPGuides\\Textures\\rxp_logo-128.blp")
local function addSubTitleFont()
createSubTitleFont("RESTEDXP", frame, 0, 60)
end
local function addTitleFont()
createLargeTitleFont("SPEEDRUN GUIDE", frame, 0, 37)
end
local function addDescriptionFont()
createDescriptionFont(
"Experience the fastest and most efficient Leveling Routes.\nHand-crafted and maintained by the best Speedrunners in\nthe Classic WoW Community.",
frame,
0,
-5
)
end
local function addSelectSpeedrunButton(anchor,x,y,callback,text)
anchor = anchor or frame