-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinc__mainMenu.pas
More file actions
6027 lines (5063 loc) · 272 KB
/
inc__mainMenu.pas
File metadata and controls
6027 lines (5063 loc) · 272 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
{*******************************************************************************
NFK [R2]
Main Menu Library
TODO: Ñî âðåìåíåì íóæíî çàìåíèòü ñ èñïîëüçîâàíèåì êëàññà r2menu
*******************************************************************************}
procedure DrawMenu;
CONST HG : byte = 20;
var cur : TPoint;
i,j,b,a : integer;
bb: byte;
// color:integer;
EACTION : boolean;
alpha : cardinal;
RG : word;
BCreateEnabled : boolean;
BFightEnabled : boolean;
clr : TColor;
s,s2 : string;
begin
GetCursorPos (cur);
EACTION := false;
menux := 0; menuy := 0;
// animate;
if MENUORDER = MENU_PAGE_DEMOS then begin
bb := GetRValue(hiclr);
if bb<100 then bb := 222;
if menuhic = false then begin
// if bb < 245 then inc(bb,round(10 - (255-bb) div (28)));
if bb < 222 then inc(bb);
if bb >= 222 then menuhic := true;
end;
if menuhic = true then begin
// if bb >= 200 then dec(bb,round(10 - (255-bb) div (28)));
if bb >= 200 then dec(bb);
if bb < 200 then menuhic := false;
end;
hiclr := rgb(bb,0,0);
end;
if SYS_CURSORFRAMEWAIT < 1 then inc(SYS_CURSORFRAMEWAIT) else begin
SYS_CURSORFRAMEWAIT := 0;
if SYS_CURSORFRAME < 10 then inc(SYS_CURSORFRAME) else SYS_CURSORFRAME := 0;
end;
if mapcansel > 0 then dec(mapcansel);
if menutimeout > 0 then dec(menutimeout);
if menuburn = 1 then // fade down
if (ctgR=tgR) then begin
MENUTIMEOUT := 100;
mainform.dxtimer.FPS := 50;
MENUEDITMODE := 0;
menuburn := 2;
menuorder := MENUWANTORDER;
ctgr := 255;
tgr := 0;
end;
if menuburn = 2 then // fade up
if (ctgR=tgR) then begin
if menuwantorder = MENU_PAGE_GOGAME then begin
ctgr := 255;
tgr := 0;
mainform.dxtimer.FPS := 50;
inmenu := false;
SPAWNSERVER;
if OPT_AUTOSHOWNAMES then begin
OPT_AUTOSHOWNAMESTIME := OPT_AUTOSHOWNAMESDEFTIME+2;
OPT_SHOWNAMES := 1;
end;
end;
MENUTIMEOUT := 100;
mainform.dxtimer.FPS := 50;
MENUWANTORDER := 0;
MENUEDITMODE := 0;
menuburn := 0;
end;
with mainform do begin
// PAGE MAINSCREEN;
if MENUORDER = MENU_PAGE_MAIN then begin
// conn: main menu mod
//for i := 0 to 2 do for b := 0 to 1 do PowerGraph.RenderEffect(Images[0], 256*i, 256*b, 0, effectNone);
PowerGraph.RenderEffect(Images[0], 75, 0, 0, effectNone);
// PowerGraph.TextureMap(Images[4], 100 - menu1_alpha div 6, 15,356,15,356,143,100,143, 0, effectSrcAlpha);
// PowerGraph.RenderEffect(Images[4], 356, 15, 1, effectSrcAlpha);
PowerGraph.RenderEffect(Images[4], 114-48, 0,0, effectSrcAlpha);
PowerGraph.RenderEffect(Images[4], 370-48, 0, 1, effectSrcAlpha);
//powerGraph.Antialias := true;
{ conn: original menu
PowerGraph.RotateEffect(Images[1], 330, 150, 64,350, 0, effectSrcAlpha);
PowerGraph.RotateEffect(Images[42],330,150,64,350,(menu1_alpha shl 24)+$FFFFFF,0,effectSrcAlpha or EffectDiffuseAlpha);
PowerGraph.RotateEffect(Images[1], 330, 195, 64,350, 1, effectSrcAlpha);
PowerGraph.RotateEffect(Images[42],330,195,64,350,(menu2_alpha shl 24)+$FFFFFF,1,effectSrcAlpha or EffectDiffuseAlpha);
PowerGraph.RotateEffect(Images[1], 330, 240, 64,350, 2, effectSrcAlpha);
PowerGraph.RotateEffect(Images[42],330,240,64,350,(menu3_alpha shl 24)+$FFFFFF,2,effectSrcAlpha or EffectDiffuseAlpha);
PowerGraph.RotateEffect(Images[1], 330, 285, 64,350, 3, effectSrcAlpha);
PowerGraph.RotateEffect(Images[42],330,285,64,350,(menu4_alpha shl 24)+$FFFFFF,3,effectSrcAlpha or EffectDiffuseAlpha);
PowerGraph.RotateEffect(Images[1], 330, 330, 64,350, 4, effectSrcAlpha);
PowerGraph.RotateEffect(Images[42],330,330,64,350,(menu5_alpha shl 24)+$FFFFFF,4,effectSrcAlpha or EffectDiffuseAlpha);
PowerGraph.RotateEffect(Images[1], 330, 375, 64,350, 5, effectSrcAlpha);
PowerGraph.RotateEffect(Images[42],330,375,64,350,(menu6_alpha shl 24)+$FFFFFF,5,effectSrcAlpha or EffectDiffuseAlpha);
}
//%%%
//nfkFont1.drawString('KILL OR DIE',217,184,$0000AA,1);
nfkFont1.drawString('HOTSEAT',249,150,$FF0000CC,1);
nfkFont1.drawString('HOTSEAT',249,150,(menu1_alpha shl 24)+$0000FF,2);
nfkFont1.drawString('MULTIPLAYER',217,185,$FF0000CC,1);
nfkFont1.drawString('MULTIPLAYER',217,185,(menu2_alpha shl 24)+$0000FF,2);
nfkFont1.drawString('SETUP',273,220,$FF0000CC,1);
nfkFont1.drawString('SETUP',273,220,(menu3_alpha shl 24)+$0000FF,2);
nfkFont1.drawString('DEMOS',266,255,$FF0000CC,1);
nfkFont1.drawString('DEMOS',266,255,(menu4_alpha shl 24)+$0000FF,2);
nfkFont1.drawString('CREDITS',251,290,$FF0000CC,1);
nfkFont1.drawString('CREDITS',251,290,(menu5_alpha shl 24)+$0000FF,2);
//drawMenuWord('MODS',271,325,$0000AA,1);
//drawMenuWord('MODS',271,325,(menu6_alpha shl 24)+$0000FF,2);
nfkFont1.drawString('EXIT',282,325,$FF0000CC,1);
nfkFont1.drawString('EXIT',282,325,(menu6_alpha shl 24)+$0000FF,2);
// PowerGraph.RotateEffect(Images[1], 330, 150, 64,350, 0, effectSrcAlpha);
//PowerGraph.RotateEffect(Images[1], 330, 150, 64,350, 1, effectSrcAlpha);
//PowerGraph.RotateEffect(Images[1], 330, 150, 64,350, 2, effectSrcAlpha);
//PowerGraph.RotateEffect(Images[42],330,150,64,350,(menu1_alpha shl 24)+$FFFFFF,0,effectSrcAlpha or EffectDiffuseAlpha);
// animate menu1
if not SYS_SHOWCRITICAL then begin
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+140) and (cur.y <= menuy+160) then begin
if (menu_sl <> 1) then begin
menu_sl := 1;
SND.play(SND_Menu1,0,0);
end;
if menu1_alpha_dir = 1 then begin if menu1_alpha <$FF then inc(menu1_alpha,15) else menu1_alpha_dir := 0;
end else if menu1_alpha_dir = 0 then begin if menu1_alpha >15 then dec(menu1_alpha,15) else menu1_alpha_dir := 1; end;
end else if menu1_alpha >15 then dec(menu1_alpha,15);
// animate menu2
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+175) and (cur.y <= menuy+195) then begin
if (menu_sl <> 2) then begin
menu_sl := 2;
SND.play(SND_Menu1,0,0);
end;
if menu2_alpha_dir = 1 then begin if menu2_alpha <$FF then inc(menu2_alpha,15) else menu2_alpha_dir := 0;
end else if menu2_alpha_dir = 0 then begin if menu2_alpha >15 then dec(menu2_alpha,15) else menu2_alpha_dir := 1; end;
end else if menu2_alpha >15 then dec(menu2_alpha,15);
// animate menu3
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+210) and (cur.y <= menuy+230) then begin
if (menu_sl <> 3) then begin
menu_sl := 3;
SND.play(SND_Menu1,0,0);
end;
if menu3_alpha_dir = 1 then begin if menu3_alpha <$FF then inc(menu3_alpha,15) else menu3_alpha_dir := 0;
end else if menu3_alpha_dir = 0 then begin if menu3_alpha >15 then dec(menu3_alpha,15) else menu3_alpha_dir := 1; end;
end else if menu3_alpha >15 then dec(menu3_alpha,15);
// animate menu4
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+245) and (cur.y <= menuy+265) then begin
if (menu_sl <> 4) then begin
menu_sl := 4;
SND.play(SND_Menu1,0,0);
end;
if menu4_alpha_dir = 1 then begin if menu4_alpha <$FF then inc(menu4_alpha,15) else menu4_alpha_dir := 0;
end else if menu4_alpha_dir = 0 then begin if menu4_alpha >15 then dec(menu4_alpha,15) else menu4_alpha_dir := 1; end;
end else if menu4_alpha >15 then dec(menu4_alpha,15);
// animate menu5
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+280) and (cur.y <= menuy+300) then begin
if (menu_sl <> 5) then begin
menu_sl := 5;
SND.play(SND_Menu1,0,0);
end;
if menu5_alpha_dir = 1 then begin if menu5_alpha <$FF then inc(menu5_alpha,15) else menu5_alpha_dir := 0;
end else if menu5_alpha_dir = 0 then begin if menu5_alpha >15 then dec(menu5_alpha,15) else menu5_alpha_dir := 1; end;
end else if menu5_alpha >15 then dec(menu5_alpha,15);
// animate menu6
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+315) and (cur.y <= menuy+335) then begin
if (menu_sl <> 6) then begin
menu_sl := 6;
SND.play(SND_Menu1,0,0);
end;
if menu6_alpha_dir = 1 then begin if menu6_alpha <$FF then inc(menu6_alpha,15) else menu6_alpha_dir := 0;
end else if menu6_alpha_dir = 0 then begin if menu6_alpha >15 then dec(menu6_alpha,15) else menu6_alpha_dir := 1; end;
end else if menu6_alpha >15 then dec(menu6_alpha,15);
end;
//powerGraph.Antialias := false;
if SYS_SHOWCRITICAL then begin
DrawWindow(SYS_SHOWCRITICAL_CAPTION,'OK',120,165,400,150,1);
Font2b.AlignedOut(SYS_SHOWCRITICAL_Text1,0,210,taCenter,TaNone,clWhite);
Font2b.AlignedOut(SYS_SHOWCRITICAL_Text2,0,230,taCenter,TaNone,clWhite);
end;
if not SYS_SHOWCRITICAL then begin
if (inconsole=false) and (menuburn=0) then begin
if iskey(ord('H')) then begin
GoMenuPage(MENU_PAGE_HOTSEAT);
if maplist.count=0 then begin
mapindex := -1;
BrimMapList(MapPath);
end;
lastmap := -2;
menu_tab := 0;
end;
if iskey(ord('M')) then begin
if maplist.count=0 then begin
mapindex := -1;
BrimMapList(MapPath);
end;
lastmap := -2;
GoMenuPage(MENU_PAGE_MULTIPLAYER);
end;
if iskey(ord('S')) then begin
GoMenuPage(MENU_PAGE_SETUP );
menu_tab := 0;
end;
if iskey(ord('C')) then
GoMenuPage(MENU_PAGE_CREDITS); gametime := -1111;
if iskey(ord('D')) then begin
if demolist.count=0 then
demoindex := 0;
BrimDemosList(DemoPath);
GoMenuPage(MENU_PAGE_DEMOS);
if demoindex-21 >0 then demoofs := demoindex -20;
end;
end;
// DrawWINDOW(0,0,640,400);
if inconsole=false then
if mapcansel=0 then
if (iskey(mbutton1)) and (menuburn = 0) then begin
//
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+140) and (cur.y <= menuy+160) then
begin // hotseat selected
GoMenuPage(MENU_PAGE_HOTSEAT);
if maplist.count=0 then begin
mapindex := -1;
BrimMapList(MapPath);
end;
lastmap := -2;
menu_tab := 0;
end;
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+175) and (cur.y <= menuy+195) then begin
GoMenuPage(MENU_PAGE_MULTIPLAYER);
if maplist.count=0 then begin
mapindex := -1;
BrimMapList(MapPath);
end;
lastmap := -2;
end;
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+210) and (cur.y <= menuy+230) then GoMenuPage(MENU_PAGE_SETUP);
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+245) and (cur.y <= menuy+265) then begin
if demolist.count=0 then
demoindex := 0;
BrimDemosList(DemoPath);
GoMenuPage(MENU_PAGE_DEMOS);
if demoindex-21 >0 then demoofs := demoindex -20;
end;
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+280) and (cur.y <= menuy+300) then begin GoMenuPage(MENU_PAGE_CREDITS); gametime := -1111; end;
if (cur.x >= menux+170) and (cur.x <= menux+470) and (cur.y >= menuy+315) and (cur.y <= menuy+335) then begin SND.play(SND_Menu2,0,0); sleep(700); mainform.close; exit; end;
end;
end else if mapcansel=0 then begin // show critical, keys;
if ISKEY(VK_RETURN) then begin mapcansel := 15; SYS_SHOWCRITICAL:=false; end;
if ClipWindowEX(120,165,400,150)=1 then begin
if (ISKEY(mbutton1)) and (mapcansel=0) then begin
mapcansel := 15;
SYS_SHOWCRITICAL:=false;
end;
end;
end;
{
Font4.Scale := 512;
Font3.AlignedOut(uppercase('Pre055. For bot developers only.'), 222, 406,tacenter,tanone, clwhite);
Font3.AlignedOut(uppercase('do not distribute'), 222, 426,tacenter,tanone, clwhite);
Font4.Scale := 256;
}
Font2b.AlignedOut('Need For Kill [R2] 2009-2010. KoD|connect', 102, 442,tacenter,tanone, $000066);
Font2.AlignedOut('Need For Kill (c) 2004. 3d[Power]. All Rights Reserved', 80, 460,tacenter,tanone, $000066);
//Font2.AlignedOut('PUSSY version, do not distribute!!!!!', 222, 436,tacenter,tanone, clWhite);
//Font2.AlignedOut('PUSSY version, do not distribute!!!!!', 222, 436,tacenter,tanone, clWhite);
//Font2.AlignedOut('http://www.3dpower.org e-mail: haz-3dpower@mail.ru', 102, 465,tacenter,tanone, $0000AA);
end else
// PAGE HOTSEAT
if MENUORDER = MENU_PAGE_HOTSEAT then begin //HOTSEAT
dxtimer.FPS := 50;
// conn: menu enchant
//for i := 0 to 2 do for b := 0 to 1 do PowerGraph.RenderEffect(Images[0], 256*i, 256*b, 0, effectNone);
PowerGraph.RenderEffect(Images[0], 75, 0, 0, effectNone);
// powerGraph.antialias := true;
PowerGraph.RenderEffect(Images[5], 510, 410, 4, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[5], 510, 410, (button1_alpha shl 24)+$FFFFFF , 5, effectSrcAlpha or effectDiffuseAlpha);
PowerGraph.RenderEffect(Images[5], 0, 410, 0, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[5], 0, 410, (button_alpha shl 24)+$FFFFFF , 1, effectSrcAlpha or effectDiffuseAlpha);
//powerGraph.Antialias := TRUE;
//PowerGraph.RotateEffect(Images[1], 120, 30, 64,350, 0, effectSrcAlpha);
nfkFont2.drawString('HOTSEAT',200,30,$ffffffff,0);
//powerGraph.Antialias := false;
// animate back button
if (cur.x >= menux+10) and (cur.x <= menux+110) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
if button_alpha_dir = 1 then begin
if button_alpha <$FF then inc(button_alpha,15) else button_alpha_dir := 0;
end else
if button_alpha_dir = 0 then begin
if button_alpha >15 then dec(button_alpha,15) else button_alpha_dir := 1;
end;
end else if button_alpha >15 then dec(button_alpha,15);
// animate fight button
if (cur.x >= menux+520) and (cur.x <= menux+621) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
if button1_alpha_dir = 1 then begin
if button1_alpha <$FF then inc(button1_alpha,15) else button1_alpha_dir := 0;
end else
if button1_alpha_dir = 0 then begin
if button1_alpha >15 then dec(button1_alpha,15) else button1_alpha_dir := 1;
end;
end else if button1_alpha >15 then dec(button1_alpha,15);
// check coord
if not inconsole then
if (iskey(mbutton1)) and (menuburn = 0) and (menueditmode = 0) and (mapcansel = 0) then begin
if (cur.x >= menux+10) and (cur.x <= menux+110) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then GoMenuPage(MENU_PAGE_MAIN);
if (cur.x >= menux+520) and (cur.x <= menux+621) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
// check if we try to spawn a directory,,
if (extractfileext(maplist[mapindex]) = '') or (maplist[mapindex] = '..') then begin // chdir
BrimMapList(MAPPath+'\'+maplist[mapindex]);
mapcansel:=10;
SND.play(SND_Menu2,0,0);
end else
GoMenuPage(MENU_PAGE_GOGAME);
end;
end;
Font3.TextOut('GAME OPTIONS:', 300, 50, clWhite);
// nasty anim...
if (extractfileext(maplist[mapindex]) = '') or (maplist[mapindex] = '..') then
prevra := 81 else prevra := 0;
if prevra < 77 then begin
// Font1.textout('Mouse sensitivity ='+MENUEDITSTR+'_',200,120+HG*3,$FF006dFF)
Font1.TextOut(map_name, 10, 222, $FF006dFF);
Font1.TextOut('Made by: '+map_author,10,237, $FF006dFF);
Font1.TextOut('Size: '+inttostr(BRICK_X)+' X '+inttostr(BRICK_Y),10,252, $FF006dFF);
end;
if menuburn=0 then begin
if menu_tab = 0 then begin
Font1.TextOut('+',5,30, clWhite);
if menu_sl < 9 then menu_sl := 9;
end;
// I THINK IT'S FIGHT BUTTON + ADDING
if menu_tab = 2 then begin
Font1.TextOut('+',540,395, clWhite);
if menu_sl < 9 then menu_sl := 9;
end;
// menu sections + ADDINGS
case menu_sl of
0 : Font1.TextOut('+',275,80, clWhite);
1 : Font1.TextOut('+',275,100, clWhite);
2 : Font1.TextOut('+',275,120, clWhite);
3 : Font1.TextOut('+',275,140, clWhite);
4 : Font1.TextOut('+',275,160, clWhite);
5 : Font1.TextOut('+',275,180, clWhite);
6 : Font1.TextOut('+',275,200, clWhite);
end;
end;
// seeking menu ENTER key
if (inconsole = false) and (iskey(VK_RETURN)) and (menueditmode > 0) and (mapcansel = 0) then begin
SND.play(SND_Menu2,0,0);
if MENUEDITMODE = 3 then applyHcommand('warmup '+MENUEDITSTR);
if MENUEDITMODE = 4 then applyHcommand('timelimit '+MENUEDITSTR);
if MENUEDITMODE = 5 then applyHcommand('fraglimit '+MENUEDITSTR);
MENUEDITSTR :='';
menueditmode := 0; mapcansel := 10;
end;
Font1.TextOut('View p1 properties',290,80,$FF006dFF);
Font1.TextOut('View p2 properties',290,100,$FF006dFF);
if OPT_NOPLAYER=2 then
Font1.TextOut('Disable player 2: Yes',290,120,$FF006dFF) else
Font1.TextOut('Disable player 2: No',290,120,$FF006dFF);
if menueditmode=3 then Font1.TextOut('Warmup='+MENUEDITSTR+'_',290,140,$FF006dFF) else
Font1.TextOut('Warmup:'+inttostr(MATCH_WARMUP),290,140,$FF006dFF);
if menueditmode=4 then Font1.TextOut('Timelimit='+MENUEDITSTR+'_',290,160,$FF006dFF) else
Font1.TextOut('Timelimit:'+inttostr(MATCH_TIMELIMIT),290,160,$FF006dFF);
if menueditmode=5 then Font1.TextOut('Fraglimit='+MENUEDITSTR+'_',290,180,$FF006dFF) else
Font1.TextOut('Fraglimit:'+inttostr(MATCH_FRAGLIMIT),290,180,$FF006dFF);
Font1.TextOut('Gametype: '+GAMETYPE_STR[MATCH_GAMETYPE],290,200,$FF006dFF);
if (inconsole = false) and (mapcansel = 0) and (menueditmode=0) and (menuburn=0) then begin
if (menu_tab = 2) and iskey(VK_LEFT) then begin SND.play(SND_menu1,0,0); menu_sl := 0; menu_tab := 1;mapcansel := 5; end else
if (menu_tab = 1) and iskey(VK_LEFT) then begin SND.play(SND_menu1,0,0); menu_sl := 9; menu_tab := 0;mapcansel := 5; end else
if (menu_tab = 0) and iskey(VK_LEFT) then begin SND.play(SND_menu1,0,0); menu_sl := 9; menu_tab := 2;mapcansel := 5; end;
if (menu_tab = 0) and ((iskey(VK_TAB)) or (iskey(VK_RIGHT)))
then begin SND.play(SND_menu1,0,0); menu_sl := 0; menu_tab := 1;mapcansel := 5; end else
if (menu_tab = 1) and((iskey(VK_TAB)) or (iskey(VK_RIGHT))) then begin
SND.play(SND_menu1,0,0);
menu_sl := 9; menu_tab := 2;mapcansel := 5; end else
if (menu_tab = 2) and ((iskey(VK_TAB)) or (iskey(VK_RIGHT))) then begin
SND.play(SND_menu1,0,0);
menu_sl := 9; menu_tab := 0;mapcansel := 5; end;
if (menu_tab = 1) and (iskey(VK_UP)) then begin
if menu_sl > 0 then dec(menu_sl) else
if menu_sl = 0 then menu_sl := 6;
SND.play(SND_menu1,0,0);
mapcansel := 5;
end;
if (menu_tab = 1) and (iskey(VK_DOWN)) then begin
if menu_sl < 6 then inc(menu_sl) else
if menu_sl = 6 then menu_sl := 0;
SND.play(SND_menu1,0,0);
mapcansel := 5;
end;
// READ ENTER KEY!!!!!!
if iskey(VK_RETURN)=true then EACTION := true;
if (dxinput.Mouse.X <> 0) or
(dxinput.Mouse.Y <> 0) or (iskey(mbutton1)) then
if mapcansel=0 then
if menueditmode = 0 then begin
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 100) and (cur.y <= 310) then begin
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
menu_tab := 1;
if menu_sl = 9 then menu_sl := 0;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 80) and (cur.y <= 98) then begin
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 0 then SND.play(SND_menu1,0,0);
menu_sl := 0;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 100) and (cur.y <= 118) then begin
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 1 then SND.play(SND_menu1,0,0);
menu_sl := 1;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 120) and (cur.y <= 138) then begin // disable player
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 2 then SND.play(SND_menu1,0,0);
menu_sl := 2;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 140) and (cur.y <= 158) then begin // disable player
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 3 then SND.play(SND_menu1,0,0);
menu_sl := 3;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 160) and (cur.y <= 178) then begin
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 4 then SND.play(SND_menu1,0,0);
menu_sl := 4;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 180) and (cur.y <= 198) then begin
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 5 then SND.play(SND_menu1,0,0);
menu_sl := 5;
end;
if (cur.x >= 285) and (cur.x <= 640) and (cur.y >= 200) and (cur.y <= 218) then begin
if iskey(mbutton1) then begin mapcansel:=4; EACTION:=true; end;
if menu_sl <> 6 then SND.play(SND_menu1,0,0);
menu_sl := 6;
end;
end;
if EAction then
case menu_sl of
0: begin p1properties_backto:= false; GoMenuPage(MENU_PAGE_P1PROP); end;
1: GoMenuPage(MENU_PAGE_P2PROP);
2: begin SND.play(SND_Menu2,0,0); mapcansel := 10; if OPT_NOPLAYER=0 then OPT_NOPLAYER := 2 else OPT_NOPLAYER := 0; end;
3: begin SND.play(SND_Menu2,0,0);MENUEDITMODE := 3; MENUEDITMAX := 3;MENUEDITSTR := inttostr(MATCH_WARMUP); mapcansel := 10; end;
4: begin SND.play(SND_Menu2,0,0);MENUEDITMODE := 4; MENUEDITMAX := 3;MENUEDITSTR := inttostr(MATCH_TIMELIMIT); mapcansel := 10; end;
5: begin SND.play(SND_Menu2,0,0);MENUEDITMODE := 5; MENUEDITMAX := 3;MENUEDITSTR := inttostr(MATCH_FRAGLIMIT); mapcansel := 10; end;
6: begin SND.play(SND_Menu2,0,0); mapcansel := 10;
if MATCH_GAMETYPE = GAMETYPE_FFA then MATCH_GAMETYPE := GAMETYPE_RAILARENA else
if MATCH_GAMETYPE = GAMETYPE_RAILARENA then MATCH_GAMETYPE := GAMETYPE_PRACTICE else
if MATCH_GAMETYPE = GAMETYPE_PRACTICE then MATCH_GAMETYPE := GAMETYPE_FFA;
end;
end;
end;
//wtf?
if prevra < 77 then begin
PowerGraph.FillRect (43+prevra, 272, 162-prevra*2, 122, $333333, effectMul);
PowerGraph.Rectangle(43+prevra, 272, 162-prevra*2, 122, $0000ca, $000000, effectadd);
end;
if menueditmode = 0 then begin
if (cur.x >= 10) and (cur.x <= 270) and (cur.y >= 70) and (cur.y <= 220) then begin
// if iskey(mbutton1) then begin
if menu_tab <> 0 then SND.play(SND_menu1,0,0);
menu_sl := 9; menu_tab := 0 end;
end;
IF INCONSOLE=FALSE THEN
if (menu_tab = 0) then begin
if (iskey(VK_UP)) or
(iskey(mScrollUp)) or
(( ClipWindowEx(7,54,259,168)=2) and (iskey(mbutton1))) then
if (mapcansel = 0) then if mapindex > 0 then begin // key up
IF mapindex > 0 then SND.play(SND_menu1,0,0);
if mapindex > 0 then dec(mapindex);
if mapindex < mapofs then dec(mapofs);
mapcansel := 4;
if iskey(mScrollUp) then mapcansel := 1;
end;
if (iskey(VK_NEXT)) and (mapcansel = 0) then begin// pagedown
if mapindex+9 <= maplist.count - 1 then begin
mapcansel := 5;
lastmap := -1;
SND.play(SND_menu1,0,0);
inc(mapindex,9);
inc(mapofs,9);
if maplist.count >= 9 then if mapofs > maplist.count-10 then begin
mapofs := maplist.count-9;
end;
end else
if mapindex+9 > maplist.count - 1 then begin
mapindex := maplist.count - 1;
mapcansel := 5;
mapofs := mapindex-7;
if mapofs < 0 then mapofs:=0;
lastmap := -1;
// SND.play(SND_menu1,320);
end;
end;
if (iskey(VK_HOME)) and (mapcansel = 0) then begin// home
if mapindex > 0 then SND.play(SND_menu1,0,0);
mapindex := 0;
mapofs := 0;
mapcansel := 5;
lastmap := -1;
end;
if (iskey(VK_END)) and (mapcansel = 0) then begin// end
if mapindex < maplist.count-1 then SND.play(SND_menu1,0,0);
mapindex := maplist.count-1;
if maplist.count-8 > 0 then mapofs := mapindex-7;
mapcansel := 5;
lastmap := -1;
end;
if (iskey(VK_PRIOR)) and (mapcansel = 0) then begin// pageup
if mapindex-9 >= 0 then begin
mapcansel := 5;
lastmap := -1;
SND.play(SND_menu1,0,0);
dec(mapindex,9);
if mapofs-9 >= 0 then dec(mapofs,9) else mapofs := 0;
end else
if mapindex-9 < 0 then begin
mapindex := 0;
mapofs := 0;
mapcansel := 5;
lastmap := -1;
// SND.play(SND_menu1,320);
end;
end;
// SCROLLER;
if maplist.count >= 2 then
if iskey(mbutton1) and (mapcansel=0) and (cur.x >= 250) and (cur.x <= 250+15) and (cur.y >= 85) and (cur.y <= 200) then begin
if cur.y > 85+ (100*mapindex div (maplist.count-1)) then if mapindex < maplist.count-1 then begin
inc (mapindex);
mapcansel := 2;
if mapindex-mapofs >= 8 then inc(mapofs);
end;
if cur.y < 85+ (100*mapindex div (maplist.count-1)) then if mapindex > 0 then begin
dec (mapindex);
mapcansel := 2;
if mapindex < mapofs then dec(mapofs);
end;
end;
if (iskey(VK_DOWN)) or
(iskey(mScrollDn)) or
(( ClipWindowEx(7,54,259,168)=3) and (iskey(mbutton1))) then
if (mapcansel = 0) then begin // key down;
IF mapindex < maplist.count - 1 then SND.play(SND_menu1,0,0);
if mapindex < maplist.count - 1 then inc(mapindex);
if mapindex-mapofs >= 8 then inc(mapofs);
mapcansel := 4;
if iskey(mScrollDn) then mapcansel := 1;
// lastmap := -1;
end;
end;
// for hotseat and multi
DrawMenu_MapMang();
// escape key cansels editing...
if (iskey(VK_ESCAPE)) and (mapcansel=0) and (menueditmode>0) then begin
menueditmode:=0;
mapcansel:=10;
SND.play(SND_Menu2,0,0);
end;
if (mapcansel=0) and (menuburn=0) and (inconsole=false) and (menueditmode=0) then begin
if (menu_tab=0) and ((iskey(VK_RETURN)) or (iskey(mbutton2)) or (iskey(mbutton3)) ) then
begin
// change directory
if (extractfileext(maplist[mapindex]) = '') or (maplist[mapindex] = '..') then begin // chdir
BrimMapList(MAPPath+'\'+maplist[mapindex]);
mapcansel:=10;
SND.play(SND_Menu2,0,0);
end;
end;
if (menu_tab = 2) and (iskey(VK_RETURN)) then begin // FIGHT BUTTON
if (extractfileext(maplist[mapindex]) = '') or (maplist[mapindex] = '..') then begin // chdir
BrimMapList(MAPPath+'\'+maplist[mapindex]);
mapcansel:=10;
SND.play(SND_Menu2,0,0);
end else
GoMenuPage(MENU_PAGE_GOGAME);
end;
if (iskey(VK_ESCAPE)) then GoMenuPage(MENU_PAGE_MAIN);
end;
end else
// MENU_PAGE_MULTIPLAYER
if menuorder = MENU_PAGE_MULTIPLAYER then begin // SETUP
// HEHE:) Disable multiplayer :)
{ menuorder := MENU_PAGE_main;
applyHcommand('disconnect');
}
dxtimer.FPS := 50;
// DRAW_BACKGROUND
//for i := 0 to 2 do for b := 0 to 1 do PowerGraph.RenderEffect(Images[0], 256*i, 256*b, 0, effectNone);
// conn: menu enchant
PowerGraph.RenderEffect(Images[0], 75, 0, 0, effectNone);
//powerGraph.Antialias := TRUE;
if MP_STEP = 1 then
//PowerGraph.RotateEffect(Images[60], 140, 30, 64, 350, 0, effectSrcAlpha) else // nfkplanet label
nfkFont2.drawString('ARENA SERVERS',130,30,$ffffffff,0) else
if MP_STEP = 4 then
//PowerGraph.RotateEffect(Images[60], 140, 30, 64, 350, 1, effectSrcAlpha) else // nfkplanet label
nfkFont2.drawString('GAME SERVER',140,30,$ffffffff,0) else
//PowerGraph.RotateEffect(Images[1], 160, 30, 64,350, 1, effectSrcAlpha);
nfkFont2.drawString('MULTIPLAYER',140,30,$ffffffff,0);
//powerGraph.Antialias := false;
// BRefreshEnabled := TRUE;
BCreateEnabled := TRUE;
BFightEnabled := TRUE;
if ((MP_STEP=1) or (MP_STEP=4)) and (MP_Sessions.count = 0) then BFightEnabled:=false;
{ if (((Mp_ProvidersMirror[MP_ProvidersIndex]='Modem Connection For DirectPlay') or (Mp_ProvidersMirror[MP_ProvidersIndex]='Serial Connection For DirectPlay')) and (MP_Sessions.count>0)) then begin
BRefreshEnabled := false;
BCreateEnabled := false;
end;
}
// BUTTONS
// -----------------
PowerGraph.RenderEffect(Images[5], 0, 410, 0, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[5], 0, 410, (button_alpha shl 24)+$FFFFFF , 1, effectSrcAlpha or effectDiffuseAlpha);
// animate back button
if (cur.x >= menux+10) and (cur.x <= menux+110) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
if button_alpha_dir = 1 then begin
if button_alpha <$FF then inc(button_alpha,15) else button_alpha_dir := 0;
end else
if button_alpha_dir = 0 then begin
if button_alpha >15 then dec(button_alpha,15) else button_alpha_dir := 1;
end;
end else if button_alpha >15 then dec(button_alpha,15);
if (MP_STEP<=2) or (MP_STEP=4) then begin
if MP_STEP=0 then begin
PowerGraph.RenderEffect(Images[46], 510, 410, 2, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[46], 510, 410, (button1_alpha shl 24)+$FFFFFF , 3, effectSrcAlpha or effectDiffuseAlpha);
end else begin
if BFightEnabled=false then
PowerGraph.RenderEffectCol(Images[5], 510, 410,$FF999999, 4, effectSrcAlpha or EffectDiffuseAlpha) else
PowerGraph.RenderEffect(Images[5], 510, 410, 4, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[5], 510, 410, (button1_alpha shl 24)+$FFFFFF , 5, effectSrcAlpha or effectDiffuseAlpha);
end;
// animate fight button
if BFightEnabled=false then button1_alpha := 0 else
if (cur.x >= menux+520) and (cur.x <= menux+621) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
if button1_alpha_dir = 1 then begin
if button1_alpha <$FF then inc(button1_alpha,15) else button1_alpha_dir := 0;
end else
if button1_alpha_dir = 0 then begin
if button1_alpha >15 then dec(button1_alpha,15) else button1_alpha_dir := 1;
end;
end else if button1_alpha >15 then dec(button1_alpha,15);
end;
if (MP_STEP=1) or (MP_STEP=4) then begin
// if Mp_ProvidersMirror[MP_ProvidersIndex]='IPX Connection For DirectPlay' then begin
// render refresh
if BRefreshEnabled=false then
PowerGraph.RenderEffectCol(Images[46], 165, 410, $FF999999, 0, effectSrcAlpha or effectDiffuseAlpha) else
PowerGraph.RenderEffect(Images[46], 165, 410, 0, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[46], 165, 410, (button2_alpha shl 24)+$FFFFFF , 1, effectSrcAlpha or effectDiffuseAlpha);
// animate back button
if BRefreshEnabled=false then button2_alpha := 0 else
if (cur.x >= menux+180) and (cur.x <= menux+280) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
if button2_alpha_dir = 1 then begin
if button2_alpha <$FF then inc(button2_alpha,15) else button2_alpha_dir := 0;
end else
if button2_alpha_dir = 0 then begin
if button2_alpha >15 then dec(button2_alpha,15) else button2_alpha_dir := 1;
end;
end else if button2_alpha >15 then dec(button2_alpha,15);
// end;
//render create
if MP_STEP<>4 then begin
if BCreateEnabled=false then
PowerGraph.RenderEffectCol(Images[5], 340, 410, $FF999999 , 2, effectSrcAlpha or effectDiffuseAlpha) else
PowerGraph.RenderEffect(Images[5], 340, 410, 2, effectSrcAlpha);
PowerGraph.RenderEffectCol(Images[5], 340, 410, (button3_alpha shl 24)+$FFFFFF , 3, effectSrcAlpha or effectDiffuseAlpha);
end;
// animate back button
if BCreateEnabled=false then button3_alpha := 0 else
if (cur.x >= menux+355) and (cur.x <= menux+455) and (cur.y >= menuy+415) and (cur.y <= menuy+465) then begin
if button3_alpha_dir = 1 then begin
if button3_alpha <$FF then inc(button3_alpha,15) else button3_alpha_dir := 0;
end else
if button3_alpha_dir = 0 then begin
if button3_alpha >15 then dec(button3_alpha,15) else button3_alpha_dir := 1;
end;
end else if button3_alpha >15 then dec(button3_alpha,15);
end;
// -----------------
// if (ctgr=255) then tgb:=0;
// if (ctgr=0) and (tgb=1) then begin
// ctgr := 255; tgr := 0;
// end;
// NFKPLANET#
if MP_STEP=0 then begin
if BNET_LOBBY_STATUS=0 then begin
DrawWindow('Select connection','',130,132,400,110,0);
PowerGraph.FillRectMap ( 135 , 150+MP_ProvidersIndex*20 , 135+375, 150+MP_ProvidersIndex*20 ,
135+375, 150+MP_ProvidersIndex*20 + 20, 135, 150+MP_ProvidersIndex*20 + 20,
(font_alpha_s shl 24)+$0000Ca, (font_alpha_s shl 24)+$0000Ca , (font_invalpha_s shl 24)+$0000Ca,(font_invalpha_s shl 24)+$0000Ca, 2 or $100);
if MP_Providers.count >= 2 then
PowerGraph.RenderEffectCol(images[57],513,163+ (42*MP_ProvidersIndex div (Mp_Providers.Count-1)),$0000da, 5,effectSrcAlpha);
for i := 0 to Mp_Providers.count-1 do
if i = 0 then
Font2b.AlignedOut(Mp_Providers[i], 130, 152+i*20, tacenter,tanone,clWhite) else
Font2b.AlignedOut(Mp_Providers[i], 130, 152+i*20, tacenter,tanone,clSilver);
Font2b.AlignedOut(Mp_Providers[MP_ProvidersIndex],170,276,tacenter,tanone,CLWhite);
// Mouse pick
// getcursorpos(cur);
if ( iskey(mbutton1) ) and (mapcansel=0) and (cur.x >= 135) and (cur.x <= 135+376) and (cur.y >= 150) and (cur.y <= 150+20*4) then
for i := 0 to 3 do
if (cur.y >= 150+20*i) and (cur.y < 150+20*i+20 ) then begin
if MP_ProvidersIndex <> i then SND.play(SND_Menu1,0,0);
MP_ProvidersIndex := i;
mapcansel:=2;
end;
if Mp_Providers[MP_ProvidersIndex]=BNET_STR_LOBBY then begin
Font2b.AlignedOut('Support up to 8 players',130,300,tacenter,tanone,CLSilver);
Font2b.AlignedOut('NFK[R2]LIVE is a meeting point of nfk online',130,332,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('players. Any currently available servers',130,348,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('are listed there, you can create and',130,364,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('register your own game on NFK[R2]LIVE!',130,380,tacenter,tanone,$FF0000CC);
end else
//
if Mp_Providers[MP_ProvidersIndex]=BNET_STR_DIRECT then begin
Font2b.AlignedOut('Support up to 8 players',130,300,tacenter,tanone,CLSilver);
Font2b.AlignedOut('This feature will help you to host a LAN',130,332,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('or a private internet game. Players has to know',130,348,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('your IP address, if you host an internet game.',130,364,tacenter,tanone,$FF0000CC);
// Font2b.AlignedOut('',130,364,tacenter,tanone,CLSilver);
// Font2b.AlignedOut('You need to enter IP address manually.',130,364,tacenter,tanone,CLSilver);
end;
if Mp_Providers[MP_ProvidersIndex] = BNET_STR_DIRECTJOIN then begin
// Font2b.AlignedOut('Support up to 8 players',130,300,tacenter,tanone,CLSilver);
Font2b.AlignedOut('Join a LAN or a private internet game.',130,332,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('You have to know an IP address of the game server.',130,348,tacenter,tanone,$FF0000CC);
end;
if Mp_Providers[MP_ProvidersIndex] = BNET_STR_JOINLAN then begin
// Font2b.AlignedOut('Support up to 8 players',130,300,tacenter,tanone,CLSilver);
Font2b.AlignedOut('Automatic NFK servers searching',130,332,tacenter,tanone,$FF0000CC);
Font2b.AlignedOut('in your Local Area Network.',130,348,tacenter,tanone,$FF0000CC);
end;
end else //end BNET_LOBBY_STATUS = 0
if BNET_LOBBY_STATUS=1 then begin // CONNECTING
DrawWindow('NFK[R2]LIVE','',320-180,240-50,360,90,1);
font2b.AlignedOut('Connecting to NFK[R2]LIVE...',0,0,tacenter,tacenter,clWhite);
mapcansel := 4;
end else
//
if BNET_LOBBY_STATUS=3 then begin // CANT CONNECT;
if (DrawWindow('Error connecting to NFK[R2]LIVE...','OK',320-250,100,500,480-200,1)) and (mouseLeft) then begin
SND.play(SND_Menu2,0,0);
mapcansel := 0;
BNET_LOBBY_STATUS := 0;
end;
font2b.TextOut('You could not connect to NFK[R2]LIVE.',90,130,clWhite);
font2b.TextOut('Please, check following reasons:',90,145,clWhite);
font2b.TextOut('1) Your computer does not have internet connection.',90,175,clWhite);
font2b.TextOut('2) You are behind proxy server.',90,190,clWhite);
font2b.TextOut('3) Your Firewall blocks connection.',90,205,clWhite);
font2b.TextOut('4) Your connection is really slow or server is in lag, ',90,220,clWhite);
font2b.TextOut(' try to connect later. ',90,235,clWhite);
font2b.textout('5) Your NFK ports are busy ('+inttostr(BNET_GAMEPORT)+' and '+inttostr(BNET_LOBBYPORT)+').',90,250,clWhite);
font2b.TextOut('6) Address of NFK[R2]LIVE Server has changed, please',90,265,clWhite);
font2b.TextOut(' visit the official NFK web site ('+WEB_SITE+')',90,280,clWhite);
font2b.TextOut(' to update your NFK[R2]LIVE address.',90,295,clWhite);
mapcansel := 4;
end else
if BNET_LOBBY_STATUS=4 then begin // direct connect: join
if not BNET_CONNECTING then begin
DrawWindow('Direct Connection: Join game','',320-180,260-100,360,140,1);
font2b.TextOut('Enter IP address:',240,200,clWhite);
DrawCombo (220,240,combo1);
end;
end;
end else
// CREATE SERVER SCREEN!!!!!1
if MP_STEP=2 then begin
//SPAWN SERVER!!!!!!11
if (inconsole=false) and (mapcansel=0) and (menuburn=0) and (menueditmode=0) then
if ((cur.x >= menux+520) and (cur.x <= menux+621) and (cur.y >= menuy+415) and (cur.y <= menuy+465) and ISKEY(mbutton1)) or ((ISKEY(ord('F'))) and (MENUEDITMODE=0)) or ((iskey(VK_RETURN)) and (MENUEDITMODE=0) and (menu_tab = 2) ) then begin
if (extractfileext(maplist[mapindex]) = '') or (maplist[mapindex] = '..') then begin // chdir
BrimMapList(MAPPath+'\'+maplist[mapindex]);
mapcansel:=10;
SND.play(SND_Menu2,0,0);
end else begin
EACTION := false;
// SERVER CREATION..
// conn: nfkLive
// Server creation
if Mp_Providers[MP_ProvidersIndex] = BNET_STR_LOBBY then
{
NFKPLANET_Register(OPT_SV_HOSTNAME,
copy(extractfilename(map_filename_fullpath),1,length(extractfilename(map_filename_fullpath))-5),
GetNumberOfPlayers,OPT_SV_MAXPLAYERS, MATCH_GAMETYPE);
}
if not nfkLive.SrvRegister(OPT_SV_HOSTNAME,
copy(extractfilename(map_filename_fullpath),1,length(extractfilename(map_filename_fullpath))-5),
GetNumberOfPlayers,OPT_SV_MAXPLAYERS, MATCH_GAMETYPE) then exit;
BNET_ISMULTIP := 1;
// BNET1.Active := true;
MP_WAITSNAPSHOT := FALSE;
GoMenuPage(MENU_PAGE_GOGAME);
INGAMEMENU:=false;
mapcansel:=0;
end;
end;
Font3.TextOut('SERVER SETTINGS:', 330, 50, clWhite);
if (extractfileext(maplist[mapindex]) <> '') and (maplist[mapindex] <> '..') then begin
Font1.TextOut(map_name, 10, 222, $FF006dFF);
Font1.TextOut('Made by: '+map_author,10,237, $FF006dFF);
Font1.TextOut('Size: '+inttostr(BRICK_X)+' X '+inttostr(BRICK_Y),10,252, $FF006dFF);
// Font4.TextOut(map_name, 10, 220, clWhite);
// Font4.TextOut('BY: '+map_author,10,235, clWhite);
// Font4.TextOut('Size: '+inttostr(BRICK_X)+' X '+inttostr(BRICK_Y),10,250, clWhite);
end;
if menuburn=0 then begin
if menu_tab = 0 then begin
Font1.TextOut('+',5,30, clWhite);
if menu_sl < 9 then menu_sl := 9;
end;
if menu_tab = 2 then begin
Font1.TextOut('+',540,395, clWhite);
if menu_sl < 9 then menu_sl := 9;
end;
// menu sections
case menu_sl of
0 : Font1.TextOut('+',275,80, clWhite);
1 : Font1.TextOut('+',275,100, clWhite);
2 : Font1.TextOut('+',275,120, clWhite);
3 : Font1.TextOut('+',275,140, clWhite);
4 : Font1.TextOut('+',275,160, clWhite);
5 : Font1.TextOut('+',275,180, clWhite);
6 : Font1.TextOut('+',275,200, clWhite);
7 : Font1.TextOut('+',275,260, clWhite);
8 : Font1.TextOut('+',275,280, clWhite);
// 9 : Font1.TextOut('+',275,300, clWhite);
end;
end;
// seeking menu ENTER key