-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQuestTradutor.lua
4017 lines (3596 loc) · 199 KB
/
QuestTradutor.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
-- QuestTradutor, Addon para Vanilla (1.12.1), TBC (2.4) e Wrath (3.3.0+)
-- Port por: Leandro Araujo
-- Pagina do Github: https://github.com/leoaviana/QuestTradutor
-- Original Addon: WoWpoPolsku_Quests (wersja: CLASSIC.02) 2019.12.23
-- Opis: AddOn wyświetla przetłumaczone questy w języku polskim.
-- Autor: Platine (e-mail: [email protected])
-- Original Addon project page: https://wowpopolsku.pl
local QTR_version = GetAddOnMetadata("QuestTradutor", "Version");
QuestTradutor:SetScript("OnEvent", function() QuestTradutor:OnEvent(this, event, name, arg1,arg2,arg3,arg4,arg5) end);
local QTR_onDebug = false;
local QTR_name = UnitName("player");
local QTR_class= UnitClass("player");
local QTR_race = UnitRace("player");
local QTR_sex = UnitSex("player"); -- 1:neutral, 2:męski, 3:żeński
local QTR_OldQuestCache
local QTR_QuestCache
local QTROptionsFrame
local _G = QuestTradutor.G
local print
local c_hooksecurefunc
local c_HookScript
if(QuestTradutor.target <= 2) then
if(QuestTradutor.SecHookScript) then
c_HookScript = QuestTradutor.SecHookScript
end
if(QuestTradutor.HookSecureFunction) then
c_hooksecurefunc = QuestTradutor.HookSecureFunction
end
end
if(QuestTradutor.Print) then
print = QuestTradutor.Print
end
local QTR_flaggedForItemFix = false;
local QTR_flaggedDisableTT = {};
local QTR_MessOrig = {
details = "Description",
objectives = "Objectives",
rewards = "Rewards",
itemchoose1= "You will be able to choose one of these rewards:",
itemchoose2= "Choose one of these rewards:",
itemreceiv1= "You will also receive:",
itemreceiv2= "You receiving the reward:",
learnspell = "Learn Spell:",
reqmoney = "Required Money:",
reqitems = "Required items:",
experience = "Experience:",
currquests = "Current Quests",
avaiquests = "Available Quests", };
local QTR_Reklama = {
ON = "Ativar a divulgação do addon no chat.",
PERIOD = "Tempo entre sucessivas divulgações:",
TEXT1 = "A quest %s foi traduzida e aceita utilizando o addon QuestTradutor (https://tiny.cc/questtradutor)",
TEXT2 = "QuestTradutor - Um AddOn que traduz quests, skills e itens (https://tiny.cc/questtradutor)",
CHANNEL = "Canal utilizado para propagar a mensagem (0 é o /say)",
};
local QTR_GameTooltip = GameTooltip;
local QTR_GameTooltipTextLeft = "GameTooltipTextLeft"
local QTR_GameTooltipTextLeft1 = "GameTooltipTextLeft1"
local QTR_GameTooltipTextRight = "GameTooltipTextRight"
local QTR_GameTooltipMoneyFrame1PrefixText = "GameTooltipMoneyFrame1PrefixText"
local QTR_GameTooltipMoneyFrame2PrefixText = "GameTooltipMoneyFrame1PrefixText"
local QTR_quest_EN = {
id = 0,
title = "",
details = "",
objectives = "",
progress = "",
completion = "",
itemchoose = "",
itemreceive = "", };
local QTR_quest_LG = {
id = 0,
title = "",
details = "",
objectives = "",
progress = "",
completion = "",
itemchoose = "",
itemreceive = "", };
local last_time = GetTime();
local last_text = 0;
local curr_trans = "1";
local curr_goss = "X";
local QTR_GS_MENUS = {};
local curr_hash = 0;
local Original_Font1 = "Fonts\\MORPHEUS.ttf";
local Original_Font2 = "Fonts\\FRIZQT__.ttf";
local WT_Font = Original_Font2;
local p_race = {
["Blood Elf"] = { M1="Krwawy Elf", D1="krwawego elfa", C1="krwawemu elfowi", B1="krwawego elfa", N1="krwawym elfem", K1="krwawym elfie", W1="Elfo Sangrento", M2="Krwawa Elfka", D2="krwawej elfki", C2="krwawej elfce", B2="krwawą elfkę", N2="krwawą elfką", K2="krwawej elfce", W2="Elfa Sangrenta" },
["Dark Iron Dwarf"] = { M1="Krasnolud Ciemnego Żelaza", D1="krasnoluda Ciemnego Żelaza", C1="krasnoludowi Ciemnego Żelaza", B1="krasnoluda Ciemnego Żelaza", N1="krasnoludem Ciemnego Żelaza", K1="krasnoludzie Ciemnego Żelaza", W1="Anão Ferro Negro", M2="Krasnoludka Ciemnego Żelaza", D2="krasnoludki Ciemnego Żelaza", C2="krasnoludce Ciemnego Żelaza", B2="krasnoludkę Ciemnego Żelaza", N2="krasnoludką Ciemnego Żelaza", K2="krasnoludce Ciemnego Żelaza", W2="Anã Ferro Negro" },
["Draenei"] = { M1="Draenei", D1="draeneia", C1="draeneiowi", B1="draeneia", N1="draeneiem", K1="draeneiu", W1="Draenei", M2="Draeneika", D2="draeneiki", C2="draeneice", B2="draeneikę", N2="draeneiką", K2="draeneice", W2="Draenaia" },
["Dwarf"] = { M1="Krasnolud", D1="krasnoluda", C1="krasnoludowi", B1="krasnoluda", N1="krasnoludem", K1="krasnoludzie", W1="Anão", M2="Krasnoludka", D2="krasnoludki", C2="krasnoludce", B2="krasnoludkę", N2="krasnoludką", K2="krasnoludce", W2="Anã" },
["Gnome"] = { M1="Gnom", D1="gnoma", C1="gnomowi", B1="gnoma", N1="gnomem", K1="gnomie", W1="Gnomo", M2="Gnomka", D2="gnomki", C2="gnomce", B2="gnomkę", N2="gnomką", K2="gnomce", W2="Gnomida" },
["Goblin"] = { M1="Goblin", D1="goblina", C1="goblinowi", B1="goblina", N1="goblinem", K1="goblinie", W1="Goblin", M2="Goblinka", D2="goblinki", C2="goblince", B2="goblinkę", N2="goblinką", K2="goblince", W2="Goblina" },
["Highmountain Tauren"] = { M1="Tauren z Wysokiej Góry", D1="taurena z Wysokiej Góry", C1="taurenowi z Wysokiej Góry", B1="taurena z Wysokiej Góry", N1="taurenen z Wysokiej Góry", K1="taurenie z Wysokiej Góry", W1="Highmountain Tauren", M2="Taurenka z Wysokiej Góry", D2="taurenki z Wysokiej Góry", C2="taurence z Wysokiej Góry", B2="taurenkę z Wysokiej Góry", N2="taurenką z Wysokiej Góry", K2="taurence z Wysokiej Góry", W2="Highmountain Tauren" },
["Human"] = { M1="Człowiek", D1="człowieka", C1="człowiekowi", B1="człowieka", N1="człowiekiem", K1="człowieku", W1="Humano", M2="Człowiek", D2="człowieka", C2="człowiekowi", B2="człowieka", N2="człowiekiem", K2="człowieku", W2="Humana" },
["Kul Tiran"] = { M1="Kul Tiran", D1="Kul Tirana", C1="Kul Tiranowi", B1="Kul Tirana", N1="Kul Tiranem", K1="Kul Tiranie", W1="Kul Tiran", M2="Kul Tiranka", D2="Kul Tiranki", C2="Kul Tirance", B2="Kul Tirankę", N2="Kul Tiranką", K2="Kul Tirance", W2="Kul Tirana" },
["Lightforged Draenei"] = { M1="Świetlisty Draenei", D1="świetlistego draeneia", C1="świetlistemu draeneiowi", B1="świetlistego draeneia", N1="świetlistym draeneiem", K1="świetlistym draeneiu", W1="Lightforged Draenei", M2="Świetlista Draeneika", D2="świetlistej draeneiki", C2="świetlistej draeneice", B2="świetlistą draeneikę", N2="świetlistą draeneiką", K2="świetlistej draeneice", W2="Lightforged Draenei" },
["Mag'har Orc"] = { M1="Ork z Mag'har", D1="orka z Mag'har", C1="orkowi z Mag'har", B1="orka z Mag'har", N1="orkiem z Mag'har", K1="orku z Mag'har", W1="Mag'har Orc", M2="Orczyca z Mag'har", D2="orczycy z Mag'har", C2="orczycy z Mag'har", B2="orczycę z Mag'har", N2="orczycą z Mag'har", K2="orczyce z Mag'har", W2="Mag'har Orc" },
["Nightborne"] = { M1="Dziecię Nocy", D1="dziecięcia nocy", C1="dziecięciu nocy", B1="dziecię nocy", N1="dziecięcem nocy", K1="dziecięciu nocy", W1="Nightborne", M2="Dziecię Nocy", D2="dziecięcia nocy", C2="dziecięciu nocy", B2="dziecię nocy", N2="dziecięcem nocy", K2="dziecięciu nocy", W2="Nightborne" },
["Night Elf"] = { M1="Nocny Elf", D1="nocnego elfa", C1="nocnemu elfowi", B1="nocnego elfa", N1="nocnym elfem", K1="nocnym elfie", W1="Elfo Noturno", M2="Nocna Elfka", D2="nocnej elfki", C2="nocnej elfce", B2="nocną elfkę", N2="nocną elfką", K2="nocnej elfce", W2="Elfa Noturna" },
["Orc"] = { M1="Ork", D1="orka", C1="orkowi", B1="orka", N1="orkiem", K1="orku", W1="Orc", M2="Orczyca", D2="orczycy", C2="orczycy", B2="orczycę", N2="orczycą", K2="orczycy", W2="Orquisa" },
["Pandaren"] = { M1="Pandaren", D1="pandarena", C1="pondarenowi", B1="pandarena", N1="pandarenem", K1="pandarenie", W1="Pandaren", M2="Pandarenka", D2="pandarenki", C2="pondarence", B2="pandarenkę", N2="pandarenką", K2="pandarence", W2="Pandarena" },
["Tauren"] = { M1="Tauren", D1="taurena", C1="taurenowi", B1="taurena", N1="taurenem", K1="taurenie", W1="Tauren", M2="Taurenka", D2="taurenki", C2="taurence", B2="taurenkę", N2="taurenką", K2="taurence", W2="Taurena" },
["Troll"] = { M1="Troll", D1="trolla", C1="trollowi", B1="trolla", N1="trollem", K1="trollu", W1="Troll", M2="Trollica", D2="trollicy", C2="trollicy", B2="trollicę", N2="trollicą", K2="trollicy", W2="Trolesa" },
["Undead"] = { M1="Nieumarły", D1="nieumarłego", C1="nieumarłemu", B1="nieumarłego", N1="nieumarłym", K1="nieumarłym", W1="Morto-vivo", M2="Nieumarła", D2="nieumarłej", C2="nieumarłej", B2="nieumarłą", N2="nieumarłą", K2="nieumarłej", W2="Morta-viva" },
["Void Elf"] = { M1="Elf Pustki", D1="elfa Pustki", C1="elfowi Pustki", B1="elfa Pustki", N1="elfem Pustki", K1="elfie Pustki", W1="Void Elf", M2="Elfka Pustki", D2="elfki Pustki", C2="elfce Pustki", B2="elfkę Pustki", N2="elfką Pustki", K2="elfce Pustki", W2="Void Elf" },
["Worgen"] = { M1="Worgen", D1="worgena", C1="worgenowi", B1="worgena", N1="worgenem", K1="worgenie", W1="Worgen", M2="Worgenka", D2="worgenki", C2="worgence", B2="worgenkę", N2="worgenką", K2="worgence", W2="Worgenin" },
["Zandalari Troll"] = { M1="Troll Zandalari", D1="trolla Zandalari", C1="trollowi Zandalari", B1="trolla Zandalari", N1="trollem Zandalari", K1="trollu Zandalari", W1="Troll Zandalari", M2="Trollica Zandalari", D2="trollicy Zandalari", C2="trollicy Zandalari", B2="trollicę Zandalari", N2="trollicą Zandalari", K2="trollicy Zandalari", W2="Trolesa Zandalari" }, }
local p_class = {
["Death Knight"] = { M1="Rycerz Śmierci", D1="rycerz śmierci", C1="rycerzowi śmierci", B1="rycerza śmierci", N1="rycerzem śmierci", K1="rycerzu śmierci", W1="Cavaleiro da Morte", M2="Rycerz Śmierci", D2="rycerz śmierci", C2="rycerzowi śmierci", B2="rycerza śmierci", N2="rycerzem śmierci", K2="rycerzu śmierci", W2="Cavaleira da Morte" },
["Demon Hunter"] = { M1="Łowca demonów", D1="łowcy demonów", C1="łowcy demonów", B1="łowcę demonów", N1="łowcą demonów", K1="łowcy demonów", W1="Caçador de Demônios", M2="Łowczyni demonów", D2="łowczyni demonów", C2="łowczyni demonów", B2="łowczynię demonów", N2="łowczynią demonów", K2="łowczyni demonów", W2="Caçadora de Demônios" },
["Druid"] = { M1="Druid", D1="druida", C1="druidowi", B1="druida", N1="druidem", K1="druidzie", W1="Druida", M2="Druidka", D2="druidki", C2="druidce", B2="druikę", N2="druidką", K2="druidce", W2="Druidesa" },
["Hunter"] = { M1="Łowca", D1="łowcy", C1="łowcy", B1="łowcę", N1="łowcą", K1="łowcy", W1="Caçador", M2="Łowczyni", D2="łowczyni", C2="łowczyni", B2="łowczynię", N2="łowczynią", K2="łowczyni", W2="Caçadora" },
["Mage"] = { M1="Czarodziej", D1="czarodzieja", C1="czarodziejowi", B1="czarodzieja", N1="czarodziejem", K1="czarodzieju", W1="Mago", M2="Czarodziejka", D2="czarodziejki", C2="czarodziejce", B2="czarodziejkę", N2="czarodziejką", K2="czarodziejce", W2="Maga" },
["Monk"] = { M1="Mnich", D1="mnicha", C1="mnichowi", B1="mnicha", N1="mnichem", K1="mnichu", W1="Monge", M2="Mniszka", D2="mniszki", C2="mniszce", B2="mniszkę", N2="mniszką", K2="mniszce", W2="Monja" },
["Paladin"] = { M1="Paladyn", D1="paladyna", C1="paladynowi", B1="paladyna", N1="paladynem", K1="paladynie", W1="Paladino", M2="Paladynka", D2="paladynki", C2="paladynce", B2="paladynkę", N2="paladynką", K2="paladynce", W2="Paladina" },
["Priest"] = { M1="Kapłan", D1="kapłana", C1="kapłanowi", B1="kapłana", N1="kapłanem", K1="kapłanie", W1="Sacerdote", M2="Kapłanka", D2="kapłanki", C2="kapłance", B2="kapłankę", N2="kapłanką", K2="kapłance", W2="Sacerdotisa" },
["Rogue"] = { M1="Łotrzyk", D1="łotrzyka", C1="łotrzykowi", B1="łotrzyka", N1="łotrzykiem", K1="łotrzyku", W1="Ladino", M2="Łotrzyca", D2="łotrzycy", C2="łotrzycy", B2="łotrzycę", N2="łotrzycą", K2="łotrzycy", W2="Ladina" },
["Shaman"] = { M1="Szaman", D1="szamana", C1="szamanowi", B1="szamana", N1="szamanem", K1="szamanie", W1="Xamã", M2="Szamanka", D2="szamanki", C2="szamance", B2="szamankę", N2="szamanką", K2="szamance", W2="Xamã" },
["Warlock"] = { M1="Czarnoksiężnik", D1="czarnoksiężnika", C1="czarnoksiężnikowi", B1="czarnoksiężnika", N1="czarnoksiężnikiem", K1="czarnoksiężniku", W1="Bruxo", M2="Czarnoksiężniczka", D2="czarnoksiężniczki", C2="czarnoksiężniczce", B2="czarnoksiężniczkę", N2="czarnoksiężniczką", K2="czarnoksiężniczce", W2="Bruxa" },
["Warrior"] = { M1="Wojownik", D1="wojownika", C1="wojownikowi", B1="wojownika", N1="wojownikiem", K1="wojowniku", W1="Guerreiro", M2="Wojowniczka", D2="wojowniczki", C2="wojowniczce", B2="wojowniczkę", N2="wojowniczką", K2="wojowniczce", W2="Guerreira" }, }
if (p_race[QTR_race]) then
player_race = { M1=p_race[QTR_race].M1, D1=p_race[QTR_race].D1, C1=p_race[QTR_race].C1, B1=p_race[QTR_race].B1, N1=p_race[QTR_race].N1, K1=p_race[QTR_race].K1, W1=p_race[QTR_race].W1, M2=p_race[QTR_race].M2, D2=p_race[QTR_race].D2, C2=p_race[QTR_race].C2, B2=p_race[QTR_race].B2, N2=p_race[QTR_race].N2, K2=p_race[QTR_race].K2, W2=p_race[QTR_race].W2 };
else
player_race = { M1=QTR_race, D1=QTR_race, C1=QTR_race, B1=QTR_race, N1=QTR_race, K1=QTR_race, W1=QTR_race, M2=QTR_race, D2=QTR_race, C2=QTR_race, B2=QTR_race, N2=QTR_race, K2=QTR_race, W2=QTR_race };
-- print ("|cff55ff00QTR - nowa rasa: "..QTR_race);
end
if (p_class[QTR_class]) then
player_class = { M1=p_class[QTR_class].M1, D1=p_class[QTR_class].D1, C1=p_class[QTR_class].C1, B1=p_class[QTR_class].B1, N1=p_class[QTR_class].N1, K1=p_class[QTR_class].K1, W1=p_class[QTR_class].W1, M2=p_class[QTR_class].M2, D2=p_class[QTR_class].D2, C2=p_class[QTR_class].C2, B2=p_class[QTR_class].B2, N2=p_class[QTR_class].N2, K2=p_class[QTR_class].K2, W2=p_class[QTR_class].W2 };
else
player_class = { M1=QTR_class, D1=QTR_class, C1=QTR_class, B1=QTR_class, N1=QTR_class, K1=QTR_class, W1=QTR_class, M2=QTR_class, D2=QTR_class, C2=QTR_class, B2=QTR_class, N2=QTR_class, K2=QTR_class, W2=QTR_class };
--print ("|cff55ff00QTR - nowa klasa: "..QTR_class);
end
local function StringHash(text) -- funkcja tworząca Hash (32-bitowa liczba) podanego tekstu
return QuestTradutor:StringHash(text);
end
-- Zmienne programowe zapisane na stałe na komputerze
function QuestTradutor:CheckVars()
if (not QTR_PS) then
QTR_PS = {};
end
if (not QTRTTT_PS) then
QTRTTT_PS = {};
end
if (not QTR_MISSING) then
QTR_MISSING = {};
end
-- inicjalizacja: tłumaczenia włączone
if (not QTR_PS["active"]) then
QTR_PS["active"] = "1";
end
-- inicjalizacja: tłumaczenie tytułu questu włączone
if (not QTR_PS["transtitle"] ) then
QTR_PS["transtitle"] = "0";
end
if (not QTR_PS["enablegoss"] ) then
QTR_PS["enablegoss"] = "1";
end
-- zmienna specjalna dostępności funkcji GetQuestID
if ( QTR_PS["isGetQuestID"] ) then
isGetQuestID=QTR_PS["isGetQuestID"];
end;
-- okresowe wyświetlanie reklam o dodatku
if (not QTR_PS["reklama"] ) then
QTR_PS["reklama"] = "1";
QTR_PS["period"] = 15;
QTR_PS["channel"] = "0";
end;
if (not QTR_PS["other1"] ) then
QTR_PS["other1"] = "1";
end;
if (not QTR_PS["other2"] ) then
QTR_PS["other2"] = "1";
end;
if (not QTR_PS["other3"] ) then
QTR_PS["other3"] = "1";
end;
if (not QTR_PS["channel"] ) then
QTR_PS["channel"] = "0";
end;
-- zapis kontrolny oryginalnych questów EN
if (not QTR_PS["control"]) then
QTR_PS["control"] = "1";
end
-- zapis wersji patcha Wow'a
if (not QTR_PS["patch"]) then
QTR_PS["patch"] = GetBuildInfo();
end
-- initialize check options
if (not QTRTTT_PS["active"] ) then
QTRTTT_PS["active"] = "1";
end
if (not QTRTTT_PS["showID"] ) then
QTRTTT_PS["showID"] = "0";
end
if (not QTRTTT_PS["saveNW"] ) then
QTRTTT_PS["saveNW"] = "0";
end
if (not QTRTTT_PS["saveWH"] ) then
QTRTTT_PS["saveWH"] = "0";
end
if (not QTRTTT_PS["compOR"] ) then
QTRTTT_PS["compOR"] = "0";
end
if (not QTRTTT_PS["body"] ) then
QTRTTT_PS["body"] = "1";
end
if (not QTRTTT_PS["mats"] ) then
QTRTTT_PS["mats"] = "1";
end
if (not QTRTTT_PS["weapon"] ) then
QTRTTT_PS["weapon"] = "1";
end
if (not QTRTTT_PS["info"] ) then
QTRTTT_PS["info"] = "1";
end
if (not QTRTTT_PS["ener"] ) then
QTRTTT_PS["ener"] = "1";
end
if (not QTRTTT_PS["try"] ) then
QTRTTT_PS["try"] = "0";
end
if(not QTRTTT_PS["isstat"]) then
QTRTTT_PS["isstat"] = "1"
end
if (not QTRTTT_PS["questHelp"] ) then
QTRTTT_PS["questHelp"] = "1";
end
if(not QTR_FIXEDQUEST) then
QTR_FIXEDQUEST = {};
end
if(not QTR_FIXEDITEM) then
QTR_FIXEDITEM = {};
end
if(not QTR_FIXEDSPELL) then
QTR_FIXEDSPELL = {};
end
-- jeszcze nazwa gracza w przepadkach / per character
if (not QTR_QUESTSTATUS) then
QTR_QUESTSTATUS = {};
end
if(not QTR_PLAYERQUESTS) then
QTR_PLAYERQUESTS = {};
end
if(not QTR_LASTCOMP) then
QTR_LASTCOMP = {};
end
if(not QTR_LASTCOMP["id"]) then
QTR_LASTCOMP["id"] = "0";
QTR_LASTCOMP["completion"] = "";
QTR_LASTCOMP["objectives"] = "";
QTR_LASTCOMP["description"] = "";
QTR_LASTCOMP["progress"] = "";
QTR_LASTCOMP["completion"] = "";
end
QTR_GS = {}; -- tablica na teksty oryginalne
end
-- Obsługa komend slash
function QuestTradutor:SlashCommand(msg)
if (msg=="on" or msg=="ON") then
if (QTR_PS["active"]=="1") then
print ("QTR - traduções estão habilitadas.");
else
print ("|cffffff00QTR - ativando traduções");
QTR_PS["active"] = "1";
QTR_ToggleButton0:Enable();
QTR_ToggleButton1:Enable();
QTR_ToggleButton2:Enable();
QTR_ToggleButtonWM:Enable();
if (QuestTradutor:isQuestGuru()) then
QTR_ToggleButton3:Enable();
end
if (QuestTradutor:isImmersion()) then
QTR_ToggleButton4:Enable();
end
QuestTradutor:Translate_On(1);
end
elseif (msg=="off" or msg=="OFF") then
if (QTR_PS["active"]=="0") then
print ("QTR - traduções estão desabilitadas.");
else
print ("|cffffff00QTR - desativando traduções.");
QTR_PS["active"] = "0";
QTR_ToggleButton0:Disable();
QTR_ToggleButton1:Disable();
QTR_ToggleButton2:Disable();
QTR_ToggleButtonWM:Disable();
if (QuestTradutorisQuestGuru()) then
QTR_ToggleButton3:Disable();
end
if (QuestTradutorisImmersion()) then
QTR_ToggleButton4:Disable();
end
QuestTradutor:Translate_Off(1);
end
elseif (msg=="title on" or msg=="TITLE ON" or msg=="title 1") then
if (QTR_PS["transtilte"]=="1") then
print ("QTR - a tradução do título está ativada.");
else
print ("|cffffff00QTR - ativando a tradução do título.");
QTR_PS["transtitle"] = "1";
--QuestInfoTitleHeader:SetFont(QTR_Font1, 18);
end
elseif (msg=="title off" or msg=="TITLE OFF" or msg=="title 0") then
if (QTR_PS["transtilte"]=="0") then
print ("QTR - a tradução do título está desativada.");
else
print ("|cffffff00QTR - desativando a tradução do título.");
QTR_PS["transtitle"] = "0";
--QuestInfoTitleHeader:SetFont(Original_Font1, 18);
end
elseif (msg=="title" or msg=="TITLE") then
if (QTR_PS["transtilte"]=="1") then
print ("QTR - a tradução do título está ativada.");
else
print ("QTR - a tradução do título está desativada.");
end
elseif (msg=="") then
if(QuestTradutor.target < 3) then
if(QTROptionsFrame) then
if(QTROptionsFrame:IsVisible() and not QTROptionsFrame.QTRMoreOptions:IsVisible()) then
QTROptionsFrame:Hide();
elseif(not QTROptionsFrame:IsVisible() and QTROptionsFrame.QTRMoreOptions:IsVisible()) then
QTROptionsFrame.QTRMoreOptions:Hide();
else
QTROptionsFrame:Show();
QTROptionsFrame.QTRMoreOptions:Hide();
end
end
else
InterfaceOptionsFrame_Show();
InterfaceOptionsFrame_OpenToCategory("QuestTradutor");
end
else
print ("QTR - Quest Tradutor, lista de comandos:");
print (" /qtr - Abre a janela de configurações do AddOn");
print (" /qtr on - Ativa o AddOn");
print (" /qtr off - Desativa o AddOn");
print (" /qtr title on - Ativa tradução dos titulos (cabeçalhos) das quests");
print (" /qtr title off - Desativa tradução dos titulos (cabeçalhos) das quests");
end
end
function QuestTradutor:SetCheckButtonState()
QTRCheckButton0:SetChecked(QTR_PS["active"]=="1");
QTRCheckButton3:SetChecked(QTR_PS["transtitle"]=="1");
QTRCheckButton4:SetChecked(QTR_PS["enablegoss"]=="1");
QTRCheckButton5:SetChecked(QTR_PS["reklama"]=="1");
WowTranslatorCheckButton0:SetChecked(QTRTTT_PS["active"]=="1");
WowTranslatorCheckButton1:SetChecked(QTRTTT_PS["showID"]=="1");
WowTranslatorCheckButton4:SetChecked(QTRTTT_PS["body"]=="1");
WowTranslatorCheckButton5:SetChecked(QTRTTT_PS["mats"]=="1");
WowTranslatorCheckButton6:SetChecked(QTRTTT_PS["weapon"]=="1");
WowTranslatorCheckButton9:SetChecked(QTRTTT_PS["ener"]=="1");
WowTranslatorCheckButton7:SetChecked(QTRTTT_PS["info"]=="1");
WowTranslatorCheckButton8:SetChecked(QTRTTT_PS["try"]=="1");
WowTranslatorCheckButton10:SetChecked(QTRTTT_PS["questHelp"]=="1");
WowTranslatorCheckButton11:SetChecked(QTRTTT_PS["isstat"]=="1");
end
local function QTR_BlizzardOptions()
-- Create main frame for information text
local QTROptionsFrame = CreateFrame("FRAME", "QuestTradutor_Options");
QTROptionsScrollFrame = CreateFrame("ScrollFrame", "QTROptionsScroll", QTROptionsFrame, "UIPanelScrollFrameTemplate");
QTROptionsScrollChild = QTROptionsScrollChild or CreateFrame("Frame");
local scrollbarName = QTROptionsScrollFrame:GetName()
local qtrOptscrollbar = _G[scrollbarName.."ScrollBar"];
local qtrOptscrollupbutton = _G[scrollbarName.."ScrollBarScrollUpButton"];
local qtrOptscrolldownbutton = _G[scrollbarName.."ScrollBarScrollDownButton"];
qtrOptscrollupbutton:ClearAllPoints();
qtrOptscrollupbutton:SetPoint("TOPRIGHT", QTROptionsScrollFrame, "TOPRIGHT", -2, -2);
qtrOptscrolldownbutton:ClearAllPoints();
qtrOptscrolldownbutton:SetPoint("BOTTOMRIGHT", QTROptionsScrollFrame, "BOTTOMRIGHT", -2, 2);
qtrOptscrollbar:ClearAllPoints();
qtrOptscrollbar:SetPoint("TOP", qtrOptscrollupbutton, "BOTTOM", 0, -2);
qtrOptscrollbar:SetPoint("BOTTOM", qtrOptscrolldownbutton, "TOP", 0, 2);
QTROptionsScrollFrame:SetScrollChild(QTROptionsScrollChild);
QTROptionsScrollFrame:SetAllPoints(QTROptionsFrame);
QTROptionsScrollChild:SetSize(InterfaceOptionsFramePanelContainer:GetWidth(), ( InterfaceOptionsFramePanelContainer:GetHeight() * 2.13 ));
local QTROptions = CreateFrame("Frame", nil, QTROptionsScrollChild);
QTROptions:SetAllPoints(QTROptionsScrollChild);
QTROptionsFrame.name = "QuestTradutor";
QTROptionsFrame.refresh = function (self) QuestTradutor:SetCheckButtonState() end;
InterfaceOptions_AddCategory(QTROptionsFrame);
local QTROptionsHeader = QTROptions:CreateFontString(nil, "ARTWORK");
QTROptionsHeader:SetFontObject(GameFontNormalLarge);
QTROptionsHeader:SetJustifyH("LEFT");
QTROptionsHeader:SetJustifyV("TOP");
QTROptionsHeader:ClearAllPoints();
QTROptionsHeader:SetPoint("TOPLEFT", 12, -12);
QTROptionsHeader:SetText(string.format("QuestTradutor by Leandro ver. "..QTR_base..",\nbackport and merge of WoWpoPolsku-Quests\nand WowTranslator by Platine © 2010-2018"));
local QTRDateOfBase = QTROptions:CreateFontString(nil, "ARTWORK");
QTRDateOfBase:SetFontObject(GameFontHighlightSmall);
QTRDateOfBase:SetJustifyH("LEFT");
QTRDateOfBase:SetJustifyV("TOP");
QTRDateOfBase:ClearAllPoints();
QTRDateOfBase:SetPoint("TOPLEFT", QTROptionsHeader, "TOPLEFT", 0, -60);
QTRDateOfBase:SetText(string.format("Versão para WOTLK(3.3), TBC(2.4), Vanilla\n(1.12.1) e banco de dados feitos por Leandro.\nGithub: leoaviana/questtradutor "));
QTRDateOfBase:SetFont(QTR_Font2, 16);
local QTRCheckButton0 = CreateFrame("CheckButton", "QTRCheckButton0", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton0:SetPoint("TOPLEFT", QTROptionsHeader, "BOTTOMLEFT", 0, -70);
QTRCheckButton0:SetScript("OnClick", function(self) if (QTR_PS["active"]=="1") then QTR_PS["active"]="0" else QTR_PS["active"]="1" end;end);
QTRCheckButton0Text:SetFont(QTR_Font2, 13);
QTRCheckButton0Text:SetText(QTR_Interface.active);
local QTROptionsMode1 = QTROptions:CreateFontString(nil, "ARTWORK");
QTROptionsMode1:SetFontObject(GameFontWhite);
QTROptionsMode1:SetJustifyH("LEFT");
QTROptionsMode1:SetJustifyV("TOP");
QTROptionsMode1:ClearAllPoints();
QTROptionsMode1:SetPoint("TOPLEFT", QTRCheckButton0, "BOTTOMLEFT", 20, -20);
QTROptionsMode1:SetFont(QTR_Font2, 13);
QTROptionsMode1:SetText(QTR_Interface.options1);
local QTRCheckButton3 = CreateFrame("CheckButton", "QTRCheckButton3", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton3:SetPoint("TOPLEFT", QTROptionsMode1, "BOTTOMLEFT", 0, -5);
QTRCheckButton3:SetScript("OnClick", function(self) if (QTR_PS["transtitle"]=="0") then QTR_PS["transtitle"]="1" else QTR_PS["transtitle"]="0" end; end);
QTRCheckButton3Text:SetFont(QTR_Font2, 13);
QTRCheckButton3Text:SetText(QTR_Interface.transtitle);
local QTRCheckButton4 = CreateFrame("CheckButton", "QTRCheckButton4", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton4:SetPoint("TOPLEFT", QTROptionsMode1, "BOTTOMLEFT", 0, -30);
QTRCheckButton4:SetScript("OnClick", function(self) if (QTR_PS["enablegoss"]=="0") then QTR_PS["enablegoss"]="1"; QTR_ToggleButtonGS:Show() else QTR_PS["enablegoss"]="0"; QTR_ToggleButtonGS:Hide() end; end);
QTRCheckButton4Text:SetFont(QTR_Font2, 13);
QTRCheckButton4Text:SetText(QTR_Interface.enablegoss);
local QTRCheckButton5 = CreateFrame("CheckButton", "QTRCheckButton5", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton5:SetPoint("TOPLEFT", QTROptionsMode1, "BOTTOMLEFT", 0, -50);
QTRCheckButton5:SetScript("OnClick", function(self) if (QTR_PS["reklama"]=="0") then QTR_PS["reklama"]="1" else QTR_PS["reklama"]="0" end; end);
QTRCheckButton5Text:SetFont(QTR_Font2, 13);
QTRCheckButton5Text:SetText(QTR_Reklama.ON);
local QTREditBox = CreateFrame("EditBox", "QTREditBox", QTROptions, "InputBoxTemplate");
QTREditBox:SetPoint("TOPLEFT", QTRCheckButton5Text, "TOPRIGHT", 10, 3);
QTREditBox:SetHeight(20);
QTREditBox:SetWidth(20);
QTREditBox:SetAutoFocus(false);
QTREditBox:SetText(QTR_PS["channel"]);
QTREditBox:SetCursorPosition(0);
QTREditBox:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
getglobal("GameTooltipTextLeft1"):SetFont(QTR_Font2, 13);
GameTooltip:SetText(QTR_Reklama.CHANNEL, nil, nil, nil, nil, true)
GameTooltip:Show() --Show the tooltip
end);
QTREditBox:SetScript("OnLeave", function(self)
getglobal("GameTooltipTextLeft1"):SetFont(Original_Font2, 13);
GameTooltip:Hide() --Hide the tooltip
end);
QTREditBox:SetScript("OnTextChanged", function(self) if (strlen(QTREditBox:GetText())>0) then QTR_PS["channel"]=QTREditBox:GetText() end; end);
local QTRPeriodText = QTROptions:CreateFontString(nil, "ARTWORK");
QTRPeriodText:SetFontObject(GameFontWhite);
QTRPeriodText:SetJustifyH("LEFT");
QTRPeriodText:SetJustifyV("TOP");
QTRPeriodText:ClearAllPoints();
QTRPeriodText:SetPoint("TOPLEFT", QTRCheckButton5, "BOTTOMLEFT", 30, -20);
QTRPeriodText:SetFont(QTR_Font2, 13);
QTRPeriodText:SetText(QTR_Reklama.PERIOD);
local QTR_slider = CreateFrame("Slider","MyAddonSlider",QTROptions,'OptionsSliderTemplate');
QTR_slider:ClearAllPoints();
QTR_slider:SetPoint("TOPLEFT",QTRPeriodText, "BOTTOMLEFT", 80, -30);
getglobal(QTR_slider:GetName() .. 'Low'):SetText('5 min.');
getglobal(QTR_slider:GetName() .. 'High'):SetText('90 min.');
getglobal(QTR_slider:GetName() .. 'Text'):SetText(QTR_PS["period"] .. " min.");
QTR_slider:SetMinMaxValues(5, 90);
QTR_slider:SetValue(QTR_PS["period"]);
QTR_slider:SetValueStep(5);
QTR_slider:SetScript("OnValueChanged", function(self)
QTR_PS["period"] = math.floor(QTR_slider:GetValue()+0.5);
getglobal(QTR_slider:GetName() .. 'Text'):SetText(QTR_PS["period"] .. " min.");
end);
local WowTranslatorOptionsStaff = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsStaff:SetFontObject(GameFontGreen);
WowTranslatorOptionsStaff:SetJustifyH("LEFT");
WowTranslatorOptionsStaff:SetJustifyV("TOP");
WowTranslatorOptionsStaff:ClearAllPoints();
WowTranslatorOptionsStaff:SetPoint("TOPLEFT", QTRCheckButton5, "BOTTOMLEFT", -15, -100);
WowTranslatorOptionsStaff:SetFont(WT_Font, 14);
WowTranslatorOptionsStaff:SetText("-----------------------------------------------------------------");
local WowTranslatorOptionsStaff1 = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsStaff1:SetFontObject(GameFontWhite);
WowTranslatorOptionsStaff1:SetJustifyH("LEFT");
WowTranslatorOptionsStaff1:SetJustifyV("TOP");
WowTranslatorOptionsStaff1:ClearAllPoints();
WowTranslatorOptionsStaff1:SetPoint("TOPLEFT", WowTranslatorOptionsStaff, "BOTTOMLEFT", 0, -20);
WowTranslatorOptionsStaff1:SetFont(WT_Font, 12);
WowTranslatorOptionsStaff1:SetText(WT_Interface.WTInfo);
local WowTranslatorCheckButton0 = CreateFrame("CheckButton", "WowTranslatorCheckButton0", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton0:SetPoint("TOPLEFT", WowTranslatorOptionsStaff1, "BOTTOMLEFT", 0, -10);
WowTranslatorCheckButton0:SetScript("OnClick", function(self) if (QTRTTT_PS["active"]=="1") then QTRTTT_PS["active"]="0" else QTRTTT_PS["active"]="1" end; end);
WowTranslatorCheckButton0Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton0Text:SetText(WT_Interface.active);
local WowTranslatorOptionsMode = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsMode:SetFontObject(GameFontWhite);
WowTranslatorOptionsMode:SetJustifyH("LEFT");
WowTranslatorOptionsMode:SetJustifyV("TOP");
WowTranslatorOptionsMode:ClearAllPoints();
WowTranslatorOptionsMode:SetPoint("TOPLEFT", WowTranslatorCheckButton0, "BOTTOMLEFT", 0, -20);
WowTranslatorOptionsMode:SetFont(WT_Font, 13);
WowTranslatorOptionsMode:SetText(WT_Interface.mode);
local WowTranslatorCheckButton1 = CreateFrame("CheckButton", "WowTranslatorCheckButton1", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton1:SetPoint("TOPLEFT", WowTranslatorOptionsMode, "BOTTOMLEFT", 2, -4);
WowTranslatorCheckButton1:SetScript("OnClick", function(self) if (QTRTTT_PS["showID"]=="1") then QTRTTT_PS["showID"]="0" else QTRTTT_PS["showID"]="1" end; end);
WowTranslatorCheckButton1Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton1Text:SetText(WT_Interface.showID);
local WowTranslatorCheckButton2 = CreateFrame("CheckButton", "WowTranslatorCheckButton2", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton2:SetPoint("TOPLEFT", WowTranslatorCheckButton1, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton2:SetScript("OnClick", function(self) return end);
WowTranslatorCheckButton2Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton2Text:SetText(WT_Interface.saveNW);
WowTranslatorCheckButton2:Hide();
-- local WowTranslatorCheckButton2b = CreateFrame("CheckButton", "WowTranslatorCheckButton2b", QTROptions, "OptionsCheckButtonTemplate");
-- WowTranslatorCheckButton2b:SetPoint("TOPLEFT", WowTranslatorCheckButton2Text, "TOPRIGHT", 24, 6);
-- WowTranslatorCheckButton2b:SetScript("OnClick", function(self) QTRTTT_PS["saveWH"] = not QTRTTT_PS["saveWH"]; end);
-- WowTranslatorCheckButton2bText:SetFont(WT_Font, 13);
-- WowTranslatorCheckButton2bText:SetText(WT_Interface.saveWH);
--local WowTranslatorCheckButton3 = CreateFrame("CheckButton", "WowTranslatorCheckButton3", QTROptions, "OptionsCheckButtonTemplate");
--WowTranslatorCheckButton3:SetPoint("TOPLEFT", WowTranslatorCheckButton2, "BOTTOMLEFT", 0, 0);
--WowTranslatorCheckButton3:SetScript("OnClick", function(self) QTRTTT_PS["compOR"] = not QTRTTT_PS["compOR"]; end);
--WowTranslatorCheckButton3Text:SetFont(WT_Font, 13);
--WowTranslatorCheckButton3Text:SetText(WT_Interface.compOR);
local WowTranslatorOptionsOnTheFly = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsOnTheFly:SetFontObject(GameFontWhite);
WowTranslatorOptionsOnTheFly:SetJustifyH("LEFT");
WowTranslatorOptionsOnTheFly:SetJustifyV("TOP");
WowTranslatorOptionsOnTheFly:ClearAllPoints();
WowTranslatorOptionsOnTheFly:SetPoint("TOPLEFT", WowTranslatorCheckButton2, "BOTTOMLEFT", -2, -20);
WowTranslatorOptionsOnTheFly:SetFont(WT_Font, 13);
WowTranslatorOptionsOnTheFly:SetText(WT_Interface.transl);
local WowTranslatorCheckButton4 = CreateFrame("CheckButton", "WowTranslatorCheckButton4", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton4:SetPoint("TOPLEFT", WowTranslatorOptionsOnTheFly, "BOTTOMLEFT", 0, -4);
WowTranslatorCheckButton4:SetScript("OnClick", function(self) if (QTRTTT_PS["body"]=="1") then QTRTTT_PS["body"]="0" else QTRTTT_PS["body"]="1" end; end);
WowTranslatorCheckButton4Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton4Text:SetText(WT_Interface.body);
local WowTranslatorCheckButton5 = CreateFrame("CheckButton", "WowTranslatorCheckButton5", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton5:SetPoint("TOPLEFT", WowTranslatorCheckButton4, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton5:SetScript("OnClick", function(self) if (QTRTTT_PS["mats"]=="1") then QTRTTT_PS["mats"]="0" else QTRTTT_PS["mats"]="1" end; end);
WowTranslatorCheckButton5Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton5Text:SetText(WT_Interface.mats);
local WowTranslatorCheckButton6 = CreateFrame("CheckButton", "WowTranslatorCheckButton6", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton6:SetPoint("TOPLEFT", WowTranslatorCheckButton5, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton6:SetScript("OnClick", function(self) if (QTRTTT_PS["weapon"]=="1") then QTRTTT_PS["weapon"]="0" else QTRTTT_PS["weapon"]="1" end; end);
WowTranslatorCheckButton6Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton6Text:SetText(WT_Interface.weapon);
local WowTranslatorCheckButton9 = CreateFrame("CheckButton", "WowTranslatorCheckButton9", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton9:SetPoint("TOPLEFT", WowTranslatorCheckButton6, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton9:SetScript("OnClick", function(self) if (QTRTTT_PS["ener"]=="1") then QTRTTT_PS["ener"]="0" else QTRTTT_PS["ener"]="1" end; end);
WowTranslatorCheckButton9Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton9Text:SetText(WT_Interface.ener);
local WowTranslatorCheckButton7 = CreateFrame("CheckButton", "WowTranslatorCheckButton7", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton7:SetPoint("TOPLEFT", WowTranslatorCheckButton9, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton7:SetScript("OnClick", function(self) if (QTRTTT_PS["info"]=="1") then QTRTTT_PS["info"]="0" else QTRTTT_PS["info"]="1" end; end);
WowTranslatorCheckButton7Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton7Text:SetText(WT_Interface.info);
local WowTranslatorCheckButton11 = CreateFrame("CheckButton", "WowTranslatorCheckButton11", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton11:SetPoint("TOPLEFT", WowTranslatorCheckButton7, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton11:SetScript("OnClick", function(self) if (QTRTTT_PS["isstat"]=="1") then QTRTTT_PS["isstat"]="0" else QTRTTT_PS["isstat"]="1" end; end);
WowTranslatorCheckButton11Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton11Text:SetText(WT_Interface.stats);
local WowTranslatorCheckButton8 = CreateFrame("CheckButton", "WowTranslatorCheckButton8", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton8:SetPoint("TOPLEFT", WowTranslatorCheckButton11, "BOTTOMLEFT", 0, -10);
WowTranslatorCheckButton8:SetScript("OnClick", function(self) if (QTRTTT_PS["try"]=="1") then QTRTTT_PS["try"]="0" else QTRTTT_PS["try"]="1" end; end);
WowTranslatorCheckButton8Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton8Text:SetText(WT_Interface.try);
local WowTranslatorCheckButton10 = CreateFrame("CheckButton", "WowTranslatorCheckButton10", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton10:SetPoint("TOPLEFT", WowTranslatorCheckButton8, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton10:SetScript("OnClick", function(self) if (QTRTTT_PS["questHelp"]=="1") then QTRTTT_PS["questHelp"]="0" else QTRTTT_PS["questHelp"]="1" end; end);
WowTranslatorCheckButton10Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton10Text:SetText(WT_Interface.questHelp);
local QTRCommandsLBL = QTROptions:CreateFontString(nil, "ARTWORK");
QTRCommandsLBL:SetFontObject(GameFontWhite);
QTRCommandsLBL:SetJustifyH("LEFT");
QTRCommandsLBL:SetJustifyV("TOP");
QTRCommandsLBL:ClearAllPoints();
QTRCommandsLBL:SetPoint("TOPLEFT", WowTranslatorCheckButton10, "BOTTOMLEFT", 0, -20);
QTRCommandsLBL:SetFont(WT_Font, 12);
QTRCommandsLBL:SetText(QTR_Interface.commands);
end
function QuestTradutor:LoadOptionsFrame()
-- Create main frame for information text
if(QuestTradutor.target > 2) then
QTR_BlizzardOptions()
return
end
QTROptionsFrame = CreateFrame("FRAME", "QuestTradutor_Options");
QTROptionsFrame:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }});
QTROptionsFrame:SetBackdropColor(0,0,0,1);
QTROptionsFrame:SetPoint("CENTER",0,0);
QTROptionsFrame:SetWidth(500)
QTROptionsFrame:SetFrameStrata("DIALOG")
QTROptionsFrame:SetHeight(600)
QTROptionsFrame:Hide();
local QTROptions = QTROptionsFrame
QTROptions:SetScript("OnUpdate", function () QuestTradutor:SetCheckButtonState() end);
local QTROptionsHeader = QTROptions:CreateFontString(nil, "ARTWORK");
QTROptionsHeader:SetFontObject(GameFontNormalLarge);
QTROptionsHeader:SetJustifyH("LEFT");
QTROptionsHeader:SetJustifyV("TOP");
QTROptionsHeader:ClearAllPoints();
QTROptionsHeader:SetPoint("TOPLEFT", 12, -12);
QTROptionsHeader:SetText(string.format("QuestTradutor by Leandro ver. "..QTR_base..",\nbackport and merge of WoWpoPolsku-Quests\nand WowTranslator by Platine © 2010-2018"));
local QTR_CloseBtn = CreateFrame("Button",nil, QTROptions, "UIPanelButtonTemplate");
QTR_CloseBtn:SetWidth(35);
QTR_CloseBtn:SetHeight(25);
QTR_CloseBtn:SetText("X");
QTR_CloseBtn:Show();
QTR_CloseBtn:ClearAllPoints();
QTR_CloseBtn:SetPoint("TOPRIGHT", -5, -5);
QTR_CloseBtn:SetScript("OnClick", function() QTROptions:Hide() end);
local QTRDateOfBase = QTROptions:CreateFontString(nil, "ARTWORK");
QTRDateOfBase:SetFontObject(GameFontHighlightSmall);
QTRDateOfBase:SetJustifyH("LEFT");
QTRDateOfBase:SetJustifyV("TOP");
QTRDateOfBase:ClearAllPoints();
QTRDateOfBase:SetPoint("TOPLEFT", QTROptionsHeader, "TOPLEFT", 0, -50);
QTRDateOfBase:SetText(string.format("Versão para WOTLK(3.3), TBC(2.4), Vanilla (1.12.1) e \nbanco de dados feitos por Leandro, Github: leoaviana/questtradutor "));
QTRDateOfBase:SetFont(QTR_Font2, 16);
local QTRCheckButton0 = CreateFrame("CheckButton", "QTRCheckButton0", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton0:SetPoint("TOPLEFT", QTROptionsHeader, "BOTTOMLEFT", 0, -40);
QTRCheckButton0:SetScript("OnClick", function(self) if (QTR_PS["active"]=="1") then QTR_PS["active"]="0" else QTR_PS["active"]="1" end;end);
QTRCheckButton0Text:SetFont(QTR_Font2, 13);
QTRCheckButton0Text:SetText(QTR_Interface.active);
local QTROptionsMode1 = QTROptions:CreateFontString(nil, "ARTWORK");
QTROptionsMode1:SetFontObject(GameFontWhite);
QTROptionsMode1:SetJustifyH("LEFT");
QTROptionsMode1:SetJustifyV("TOP");
QTROptionsMode1:ClearAllPoints();
QTROptionsMode1:SetPoint("TOPLEFT", QTRCheckButton0, "BOTTOMLEFT", 20, -10);
QTROptionsMode1:SetFont(QTR_Font2, 13);
QTROptionsMode1:SetText(QTR_Interface.options1);
local QTRCheckButton3 = CreateFrame("CheckButton", "QTRCheckButton3", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton3:SetPoint("TOPLEFT", QTROptionsMode1, "BOTTOMLEFT", 0, -5);
QTRCheckButton3:SetScript("OnClick", function(self) if (QTR_PS["transtitle"]=="0") then QTR_PS["transtitle"]="1" else QTR_PS["transtitle"]="0" end; end);
QTRCheckButton3Text:SetFont(QTR_Font2, 13);
QTRCheckButton3Text:SetText(QTR_Interface.transtitle);
local QTRCheckButton4 = CreateFrame("CheckButton", "QTRCheckButton4", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton4:SetPoint("TOPLEFT", QTROptionsMode1, "BOTTOMLEFT", 0, -30);
QTRCheckButton4:SetScript("OnClick", function(self) if (QTR_PS["enablegoss"]=="0") then QTR_PS["enablegoss"]="1"; QTR_ToggleButtonGS:Show() else QTR_PS["enablegoss"]="0"; QTR_ToggleButtonGS:Hide() end; end);
QTRCheckButton4Text:SetFont(QTR_Font2, 13);
QTRCheckButton4Text:SetText(QTR_Interface.enablegoss);
local QTRCheckButton5 = CreateFrame("CheckButton", "QTRCheckButton5", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton5:SetPoint("TOPLEFT", QTROptionsMode1, "BOTTOMLEFT", 0, -50);
QTRCheckButton5:SetScript("OnClick", function(self) if (QTR_PS["reklama"]=="0") then QTR_PS["reklama"]="1" else QTR_PS["reklama"]="0" end; end);
QTRCheckButton5Text:SetFont(QTR_Font2, 13);
QTRCheckButton5Text:SetText(QTR_Reklama.ON);
local QTREditBox = CreateFrame("EditBox", "QTREditBox", QTROptions, "InputBoxTemplate");
QTREditBox:SetPoint("TOPLEFT", QTRCheckButton5Text, "TOPRIGHT", 10, 3);
QTREditBox:SetHeight(20);
QTREditBox:SetWidth(20);
QTREditBox:SetAutoFocus(false);
QTREditBox:SetText(QTR_PS["channel"]);
QTREditBox:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(QTREditBox, "ANCHOR_TOPRIGHT")
GameTooltip:SetText(QTR_Reklama.CHANNEL, nil, nil, nil, nil, true)
GameTooltip:Show() --Show the tooltip
end);
QTREditBox:SetScript("OnLeave", function(self)
GameTooltip:Hide() --Hide the tooltip
end);
QTREditBox:SetScript("OnTextChanged", function(self) if (strlen(QTREditBox:GetText())>0) then QTR_PS["channel"]=QTREditBox:GetText() end; end);
local QTRPeriodText = QTROptions:CreateFontString(nil, "ARTWORK");
QTRPeriodText:SetFontObject(GameFontWhite);
QTRPeriodText:SetJustifyH("LEFT");
QTRPeriodText:SetJustifyV("TOP");
QTRPeriodText:ClearAllPoints();
QTRPeriodText:SetPoint("TOPLEFT", QTRCheckButton5, "BOTTOMLEFT", 30, -10);
QTRPeriodText:SetFont(QTR_Font2, 13);
QTRPeriodText:SetText(QTR_Reklama.PERIOD);
local QTR_slider = CreateFrame("Slider","MyAddonSlider",QTROptions,'OptionsSliderTemplate');
QTR_slider:ClearAllPoints();
QTR_slider:SetPoint("TOPLEFT",QTRPeriodText, "BOTTOMLEFT", 80, -30);
getglobal(QTR_slider:GetName() .. 'Low'):SetText('5 min.');
getglobal(QTR_slider:GetName() .. 'High'):SetText('90 min.');
getglobal(QTR_slider:GetName() .. 'Text'):SetText(QTR_PS["period"] .. " min.");
QTR_slider:SetMinMaxValues(5, 90);
QTR_slider:SetValue(QTR_PS["period"]);
QTR_slider:SetValueStep(5);
QTR_slider:SetScript("OnValueChanged", function(self)
QTR_PS["period"] = math.floor(QTR_slider:GetValue()+0.5);
getglobal(QTR_slider:GetName() .. 'Text'):SetText(QTR_PS["period"] .. " min.");
end);
local WowTranslatorOptionsStaff1 = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsStaff1:SetFontObject(GameFontWhite);
WowTranslatorOptionsStaff1:SetJustifyH("LEFT");
WowTranslatorOptionsStaff1:SetJustifyV("TOP");
WowTranslatorOptionsStaff1:ClearAllPoints();
WowTranslatorOptionsStaff1:SetPoint("TOPRIGHT", QTRCheckButton5, "BOTTOMRIGHT", 250, -100);
WowTranslatorOptionsStaff1:SetFont(WT_Font, 12);
WowTranslatorOptionsStaff1:SetText(WT_Interface.WTInfo);
local WowTranslatorCheckButton0 = CreateFrame("CheckButton", "WowTranslatorCheckButton0", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton0:SetPoint("TOPLEFT", WowTranslatorOptionsStaff1, "BOTTOMLEFT", 0, -10);
WowTranslatorCheckButton0:SetScript("OnClick", function(self) if (QTRTTT_PS["active"]=="1") then QTRTTT_PS["active"]="0" else QTRTTT_PS["active"]="1" end; end);
WowTranslatorCheckButton0Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton0Text:SetText(WT_Interface.active);
local WowTranslatorOptionsMode = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsMode:SetFontObject(GameFontWhite);
WowTranslatorOptionsMode:SetJustifyH("LEFT");
WowTranslatorOptionsMode:SetJustifyV("TOP");
WowTranslatorOptionsMode:ClearAllPoints();
WowTranslatorOptionsMode:SetPoint("TOPLEFT", WowTranslatorCheckButton0, "BOTTOMLEFT", 0, -5);
WowTranslatorOptionsMode:SetFont(WT_Font, 13);
WowTranslatorOptionsMode:SetText(WT_Interface.mode);
local WowTranslatorCheckButton1 = CreateFrame("CheckButton", "WowTranslatorCheckButton1", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton1:SetPoint("TOPLEFT", WowTranslatorOptionsMode, "BOTTOMLEFT", 2, -4);
WowTranslatorCheckButton1:SetScript("OnClick", function(self) if (QTRTTT_PS["showID"]=="1") then QTRTTT_PS["showID"]="0" else QTRTTT_PS["showID"]="1" end; end);
WowTranslatorCheckButton1Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton1Text:SetText(WT_Interface.showID);
local WowTranslatorOptionsOnTheFly = QTROptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsOnTheFly:SetFontObject(GameFontWhite);
WowTranslatorOptionsOnTheFly:SetJustifyH("LEFT");
WowTranslatorOptionsOnTheFly:SetJustifyV("TOP");
WowTranslatorOptionsOnTheFly:ClearAllPoints();
WowTranslatorOptionsOnTheFly:SetPoint("TOPLEFT", WowTranslatorCheckButton1, "TOPLEFT", -2, -30);
WowTranslatorOptionsOnTheFly:SetFont(WT_Font, 13);
WowTranslatorOptionsOnTheFly:SetText(WT_Interface.transl);
local WowTranslatorCheckButton10 = CreateFrame("CheckButton", "WowTranslatorCheckButton10", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton10:SetPoint("TOPLEFT", WowTranslatorCheckButton1, "BOTTOMLEFT", 0, -15);
WowTranslatorCheckButton10:SetScript("OnClick", function(self) if (QTRTTT_PS["questHelp"]=="1") then QTRTTT_PS["questHelp"]="0" else QTRTTT_PS["questHelp"]="1" end; end);
WowTranslatorCheckButton10Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton10Text:SetText(WT_Interface.questHelp);
local WowTranslatorCheckButton8 = CreateFrame("CheckButton", "WowTranslatorCheckButton8", QTROptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton8:SetPoint("TOPLEFT", WowTranslatorCheckButton10, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton8:SetScript("OnClick", function(self) if (QTRTTT_PS["try"]=="1") then QTRTTT_PS["try"]="0" else QTRTTT_PS["try"]="1" end; end);
WowTranslatorCheckButton8Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton8Text:SetText(WT_Interface.try);
-----------------------------------------------------------------------------------------------------------------------------------------------
local QTRMoreOptions = CreateFrame("FRAME", "QuestTradutor_MoreOptions");
QTRMoreOptions:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }});
QTRMoreOptions:SetBackdropColor(0,0,0,1);
QTRMoreOptions:SetPoint("CENTER",0,0);
QTRMoreOptions:SetWidth(500)
QTRMoreOptions:SetFrameStrata("DIALOG")
QTRMoreOptions:SetHeight(600)
QTRMoreOptions:Hide();
QTROptions.QTRMoreOptions = QTRMoreOptions;
QTRMoreOptions:SetScript("OnUpdate", function () QuestTradutor:SetCheckButtonState() end);
local QTROptionsHeaderM = QTRMoreOptions:CreateFontString(nil, "ARTWORK");
QTROptionsHeaderM:SetFontObject(GameFontNormalLarge);
QTROptionsHeaderM:SetJustifyH("LEFT");
QTROptionsHeaderM:SetJustifyV("TOP");
QTROptionsHeaderM:ClearAllPoints();
QTROptionsHeaderM:SetPoint("TOPLEFT", 12, -12);
QTROptionsHeaderM:SetText(string.format("QuestTradutor by Leandro ver. "..QTR_base..",\nbackport and merge of WoWpoPolsku-Quests\nand WowTranslator by Platine © 2010-2018"));
local QTR_CloseBtnM = CreateFrame("Button",nil, QTRMoreOptions, "UIPanelButtonTemplate");
QTR_CloseBtnM:SetWidth(35);
QTR_CloseBtnM:SetHeight(25);
QTR_CloseBtnM:SetText("X");
QTR_CloseBtnM:Show();
QTR_CloseBtnM:ClearAllPoints();
QTR_CloseBtnM:SetPoint("TOPRIGHT", -5, -5);
QTR_CloseBtnM:SetScript("OnClick", function() QTROptions:Show() QTRMoreOptions:Hide() end);
local QTRDateOfBaseM = QTRMoreOptions:CreateFontString(nil, "ARTWORK");
QTRDateOfBaseM:SetFontObject(GameFontHighlightSmall);
QTRDateOfBaseM:SetJustifyH("LEFT");
QTRDateOfBaseM:SetJustifyV("TOP");
QTRDateOfBaseM:ClearAllPoints();
QTRDateOfBaseM:SetPoint("TOPLEFT", QTROptionsHeader, "TOPLEFT", 0, -50);
QTRDateOfBaseM:SetText(string.format("Versão para WOTLK(3.3), TBC(2.4), Vanilla (1.12.1) e \nbanco de dados feitos por Leandro, Github @leoaviana "));
QTRDateOfBaseM:SetFont(QTR_Font2, 16);
local WowTranslatorOptionsOnTheFlyM = QTRMoreOptions:CreateFontString(nil, "ARTWORK");
WowTranslatorOptionsOnTheFlyM:SetFontObject(GameFontWhite);
WowTranslatorOptionsOnTheFlyM:SetJustifyH("LEFT");
WowTranslatorOptionsOnTheFlyM:SetJustifyV("TOP");
WowTranslatorOptionsOnTheFlyM:ClearAllPoints();
WowTranslatorOptionsOnTheFlyM:SetPoint("TOPLEFT", QTRDateOfBaseM, "TOPLEFT", 0, -50);
WowTranslatorOptionsOnTheFlyM:SetFont(WT_Font, 13);
WowTranslatorOptionsOnTheFlyM:SetText(WT_Interface.transl);
local WowTranslatorCheckButton4 = CreateFrame("CheckButton", "WowTranslatorCheckButton4", QTRMoreOptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton4:SetPoint("TOPLEFT", WowTranslatorOptionsOnTheFlyM, "BOTTOMLEFT", 0, -4);
WowTranslatorCheckButton4:SetScript("OnClick", function(self) if (QTRTTT_PS["body"]=="1") then QTRTTT_PS["body"]="0" else QTRTTT_PS["body"]="1" end; end);
WowTranslatorCheckButton4Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton4Text:SetText(WT_Interface.body);
local WowTranslatorCheckButton5 = CreateFrame("CheckButton", "WowTranslatorCheckButton5", QTRMoreOptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton5:SetPoint("TOPLEFT", WowTranslatorCheckButton4, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton5:SetScript("OnClick", function(self) if (QTRTTT_PS["mats"]=="1") then QTRTTT_PS["mats"]="0" else QTRTTT_PS["mats"]="1" end; end);
WowTranslatorCheckButton5Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton5Text:SetText(WT_Interface.mats);
local WowTranslatorCheckButton6 = CreateFrame("CheckButton", "WowTranslatorCheckButton6", QTRMoreOptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton6:SetPoint("TOPLEFT", WowTranslatorCheckButton5, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton6:SetScript("OnClick", function(self) if (QTRTTT_PS["weapon"]=="1") then QTRTTT_PS["weapon"]="0" else QTRTTT_PS["weapon"]="1" end; end);
WowTranslatorCheckButton6Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton6Text:SetText(WT_Interface.weapon);
local WowTranslatorCheckButton9 = CreateFrame("CheckButton", "WowTranslatorCheckButton9", QTRMoreOptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton9:SetPoint("TOPLEFT", WowTranslatorCheckButton6, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton9:SetScript("OnClick", function(self) if (QTRTTT_PS["ener"]=="1") then QTRTTT_PS["ener"]="0" else QTRTTT_PS["ener"]="1" end; end);
WowTranslatorCheckButton9Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton9Text:SetText(WT_Interface.ener);
local WowTranslatorCheckButton7 = CreateFrame("CheckButton", "WowTranslatorCheckButton7", QTRMoreOptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton7:SetPoint("TOPLEFT", WowTranslatorCheckButton9, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton7:SetScript("OnClick", function(self) if (QTRTTT_PS["info"]=="1") then QTRTTT_PS["info"]="0" else QTRTTT_PS["info"]="1" end; end);
WowTranslatorCheckButton7Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton7Text:SetText(WT_Interface.info);
local WowTranslatorCheckButton11 = CreateFrame("CheckButton", "WowTranslatorCheckButton11", QTRMoreOptions, "OptionsCheckButtonTemplate");
WowTranslatorCheckButton11:SetPoint("TOPLEFT", WowTranslatorCheckButton7, "BOTTOMLEFT", 0, 0);
WowTranslatorCheckButton11:SetScript("OnClick", function(self) if (QTRTTT_PS["isstat"]=="1") then QTRTTT_PS["isstat"]="0" else QTRTTT_PS["isstat"]="1" end; end);
WowTranslatorCheckButton11Text:SetFont(WT_Font, 13);
WowTranslatorCheckButton11Text:SetText(WT_Interface.stats);
local QTR_GoBackBtn = CreateFrame("Button",nil, QTRMoreOptions, "UIPanelButtonTemplate");
QTR_GoBackBtn:SetWidth(90);
QTR_GoBackBtn:SetHeight(25);
QTR_GoBackBtn:SetText("<- Voltar");
QTR_GoBackBtn:Show();
QTR_GoBackBtn:ClearAllPoints();
QTR_GoBackBtn:SetPoint("TOPLEFT", WowTranslatorCheckButton11, "BOTTOMRIGHT", 360, -215);
QTR_GoBackBtn:SetScript("OnClick", function() QTROptions:Show() QTRMoreOptions:Hide() end);
-----------------------------------------------------------------------------------------------------------------------------
local QTR_MoreOptionsBtn = CreateFrame("Button",nil, QTROptions, "UIPanelButtonTemplate");
QTR_MoreOptionsBtn:SetWidth(90);
QTR_MoreOptionsBtn:SetHeight(25);
QTR_MoreOptionsBtn:SetText("Mais Opções");
QTR_MoreOptionsBtn:Show();
QTR_MoreOptionsBtn:ClearAllPoints();
QTR_MoreOptionsBtn:SetPoint("TOPLEFT", WowTranslatorCheckButton8, "BOTTOMRIGHT", 350, 0);
QTR_MoreOptionsBtn:SetScript("OnClick", function() QTROptions:Hide() QTRMoreOptions:Show() end);
local QTRCommandsLBL = QTROptions:CreateFontString(nil, "ARTWORK");
QTRCommandsLBL:SetFontObject(GameFontWhite);
QTRCommandsLBL:SetJustifyH("LEFT");
QTRCommandsLBL:SetJustifyV("TOP");
QTRCommandsLBL:ClearAllPoints();
QTRCommandsLBL:SetPoint("TOPLEFT", WowTranslatorCheckButton8, "BOTTOMLEFT", 0, -20);
QTRCommandsLBL:SetFont(WT_Font, 12);
QTRCommandsLBL:SetText(QTR_Interface.commands);
end
local timer = CreateFrame("FRAME");
function QuestTradutor:wait(delay, func, arg1,arg2,arg3,arg4,arg5)
local endTime = GetTime() + delay;
timer:SetScript("OnUpdate", function()
if(endTime < GetTime()) then
--time is up
func(arg1,arg2,arg3,arg4,arg5);
timer:SetScript("OnUpdate", nil);
end
end);
end
function QuestTradutor:ToggleQuestTranslate()
if (curr_trans=="1") then
curr_trans="0";
QuestTradutor:Translate_Off(1);
else
curr_trans="1";
QuestTradutor:Translate_On(1);
end
end
function QuestTradutor:ToggleGossipTranslate()
if (curr_goss=="1") then -- wyłącz tłumaczenie - pokaż oryginalny tekst
curr_goss="0";
QuestTradutor:TranslateGossip_OFF();
else -- pokaż tłumaczenie PL
curr_goss="1";
QuestTradutor:TranslateGossip_ON();
end
end
function QuestTradutor:TranslateGossip_ON()
if(QuestTradutor:isImmersion()) then
local Greeting_PL = GS_Gossip[curr_hash];
ImmersionFrame.TalkBox.TextFrame.Text:SetText(QuestTradutor:ExpandUnitInfo(Greeting_PL));
QTR_ToggleButtonGS4:SetText("Gossip-Hash=["..tostring(curr_hash).."] "..GS_lang);
local titleButton;
for i = 1, ImmersionFrame.TitleButtons:GetNumActive(), 1 do
titleButton=ImmersionFrame.TitleButtons:GetButton(i);
if (titleButton:GetText()) then