-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.pde
1123 lines (1025 loc) · 52.7 KB
/
Menu.pde
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
class Menu {
PImage image_main_menu_background;
PImage image_secondary_menu_background;
PImage image_thumb1;
PImage image_thumb2;
PImage image_thumb3;
PImage image_thumb4;
PImage image_thumb2_locked;
PImage image_thumb3_locked;
PImage image_thumb4_locked;
PImage image_return_arrow_red;
PImage image_return_arrow_yellow;
PImage image_right_arrow_red;
PImage image_right_arrow_yellow;
PImage image_left_arrow_red;
PImage image_left_arrow_yellow;
PImage image_up_arrowC;
PImage image_down_arrowC;
PImage image_tab_blue1;
PImage image_tab_blue2;
PImage image_tab_black;
PImage image_tab_white;
PImage image_tab_red;
PImage image_tab_yellow;
PImage image_tabS_red;
PImage image_tabS_yellow;
PImage image_course;
PImage image_character0;
PImage image_character1;
PImage image_character2;
PImage image_character3;
PImage image_character4;
PImage image_character5;
Flag flag;
String menu_state;
int return_x;
int return_y;
boolean mouse_over_return;
//main menu
int start_game_x;
int start_game_y;
int settings_x;
int settings_y;
int exit_game_x;
int exit_game_y;
boolean mouse_over_start_game;
boolean mouse_over_settings;
boolean mouse_over_exit_game;
PImage cloud0;
PImage cloud1;
//cloud coordinates
int left_x;
int left_y;
int right_x;
int right_y;
int row; //which cloud shall be printed on the left
//character menu
String[] characters;
int character;
int character_temp;
int character_x;
int character_y;
int select_x;
int select_y;
boolean character_selected;
boolean mouse_over_next_character;
boolean mouse_over_previous_character;
boolean mouse_over_select;
boolean mouse_over_displayed_character;
//level menu
boolean level_1;
boolean level_2;
boolean level_3;
boolean level_4;
boolean year_locked;
int play_x;
int play_y;
boolean mouse_over_play;
int next_level_x;
int next_level_y;
int previous_level_x;
int previous_level_y;
boolean mouse_over_next_level;
boolean mouse_over_previous_level;
//settings menu
boolean fps;
boolean hitboxes;
boolean coordinates;
boolean mouse_over_display_fps;
boolean mouse_over_display_hitboxes;
boolean mouse_over_display_coordinates;
float volume;
int master_volume;
int master_x;
int master_y;
int master_volume_x;
int master_volume_up_y;
int master_volume_down_y;
boolean mouse_over_master_volume_up;
boolean mouse_over_master_volume_down;
int music_volume;
int music_x;
int music_y;
int music_volume_x;
int music_volume_up_y;
int music_volume_down_y;
boolean mouse_over_music_volume_up;
boolean mouse_over_music_volume_down;
int sfx_volume;
int sfx_x;
int sfx_y;
int sfx_volume_x;
int sfx_volume_up_y;
int sfx_volume_down_y;
boolean mouse_over_sfx_volume_up;
boolean mouse_over_sfx_volume_down;
boolean changed; //used to determine if we have to generate new cloud locations or not
boolean credits_shown;
Degree degree;
Menu() {
//images
image_main_menu_background = loadImage(sketchPath() + "/images/backgrounds/sky_aueb.png");
image_secondary_menu_background = loadImage(sketchPath() + "/images/backgrounds/sky.png");
image_thumb1 = loadImage(sketchPath() + "/images/thumbnails/1st_thumb.png");
image_thumb2 = loadImage(sketchPath() + "/images/thumbnails/2nd_thumb.png");
image_thumb3 = loadImage(sketchPath() + "/images/thumbnails/3rd_thumb.png");
image_thumb4 = loadImage(sketchPath() + "/images/thumbnails/4th_thumb.png");
image_thumb2_locked = loadImage(sketchPath() + "/images/thumbnails/2nd_thumb_locked.png");
image_thumb3_locked = loadImage(sketchPath() + "/images/thumbnails/3rd_thumb_locked.png");
image_thumb4_locked = loadImage(sketchPath() + "/images/thumbnails/4th_thumb_locked.png");
image_return_arrow_red = loadImage(sketchPath() + "/images/miscellaneous/arrows/return_arrow_red.png");
image_return_arrow_yellow = loadImage(sketchPath() + "/images/miscellaneous/arrows/return_arrow_yellow.png");
image_right_arrow_red = loadImage(sketchPath() + "/images/miscellaneous/arrows/right_arrow_red.png");
image_right_arrow_yellow = loadImage(sketchPath() + "/images/miscellaneous/arrows/right_arrow_yellow.png");
image_left_arrow_red = loadImage(sketchPath() + "/images/miscellaneous/arrows/left_arrow_red.png");
image_left_arrow_yellow = loadImage(sketchPath() + "/images/miscellaneous/arrows/left_arrow_yellow.png");
image_up_arrowC = loadImage(sketchPath() + "/images/miscellaneous/arrows/up_arrowC.png");
image_down_arrowC = loadImage(sketchPath() + "/images/miscellaneous/arrows/down_arrowC.png");
image_tab_blue1 = loadImage(sketchPath() + "/images/miscellaneous/tabs/tab_blue1.png");
image_tab_blue2 = loadImage(sketchPath() + "/images/miscellaneous/tabs/tab_blue2.png");
image_tab_black = loadImage(sketchPath() + "/images/miscellaneous/tabs/tab_black.png");
image_tab_white = loadImage(sketchPath() + "/images/miscellaneous/tabs/tab_white.png");
image_tab_red = loadImage(sketchPath() + "/images/miscellaneous/tabs/tab_red.png");
image_tab_yellow = loadImage(sketchPath() + "/images/miscellaneous/tabs/tab_yellow.png");
image_tabS_red = loadImage(sketchPath() + "/images/miscellaneous/tabs/tabS_red.png");
image_tabS_yellow = loadImage(sketchPath() + "/images/miscellaneous/tabs/tabS_yellow.png");
image_course = loadImage(sketchPath() + "/images/objects/course.png");
flag = new Flag(round(width*(672.0/1440)), round(height*(521.0/900)), round(width*(128.0/1440)), round(height*(128.0/900)));
menu_state = "MAIN MENU";
//available characters
characters = new String[6];
characters[0] = "male";
image_character0 = loadImage(sketchPath() + "/images/characters/" + characters[0] + "/idle0.png");
characters[1] = "female";
image_character1 = loadImage(sketchPath() + "/images/characters/" + characters[1] + "/idle0.png");
characters[2] = "thanos";
image_character2 = loadImage(sketchPath() + "/images/characters/" + characters[2] + "/idle0.png");
characters[3] = "athanasia";
image_character3 = loadImage(sketchPath() + "/images/characters/" + characters[3] + "/idle0.png");
characters[4] = "emo_male";
image_character4 = loadImage(sketchPath() + "/images/characters/" + characters[4] + "/idle0.png");
characters[5] = "emo_female";
image_character5 = loadImage(sketchPath() + "/images/characters/" + characters[5] + "/idle0.png");
changed = false;
cloud0 = loadImage(sketchPath() + "/images/miscellaneous/clouds/cloud0.png");
cloud1 = loadImage(sketchPath() + "/images/miscellaneous/clouds/cloud1.png");
left_x = getRandomNumber(0, 300);
left_y = getRandomNumber(0, 400);
right_x = getRandomNumber(1200, 950);
right_y = getRandomNumber(0, 400);
row = getRandomNumber(0, 2);
return_x = width;
return_y = height;
mouse_over_return = false;
start_game_x = width/2;
start_game_y = height/2-round(height*(75.0/900));
settings_x = width/2;
settings_y = height/2;
exit_game_x = width/2;
exit_game_y = height/2+round(height*(75.0/900));
mouse_over_start_game = false;
mouse_over_settings = false;
mouse_over_exit_game = false;
character = 0;
character_temp = 0;
character_x = width/2;
character_y = height/2;
select_x = width/2;
select_y = height;
character_selected = false;
mouse_over_next_character = false;
mouse_over_previous_character = false;
mouse_over_select = false;
mouse_over_displayed_character = false;
levelReset();
year_locked = false;
play_x = width/2;
play_y = height;
mouse_over_play = false;
next_level_x = width;
next_level_y = height/2;
previous_level_x = 0;
previous_level_y = height/2;
mouse_over_next_level = false;
mouse_over_previous_level = false;
fps = false;
hitboxes = false;
coordinates = false;
mouse_over_display_fps = false;
mouse_over_display_hitboxes = false;
mouse_over_display_coordinates = false;
master_volume = 5;
master_x = round(width*(100.0/1440));
master_y = round(height*(422.0/900));
master_volume_x = master_x+round(width*(180.0/1440));
master_volume_up_y = master_y+round(height*(37.0/900));
master_volume_down_y = master_volume_up_y+round(height*(100.0/900));
mouse_over_master_volume_up = false;
mouse_over_master_volume_down = false;
music_volume = 5;
music_x = round(width*(570.0/1440));
music_y = round(height*(422.0/900));
music_volume_x = music_x+round(width*(150.0/1440));
music_volume_up_y = music_y+round(height*(37.0/900));
music_volume_down_y = music_volume_up_y+round(height*(100.0/900));
mouse_over_music_volume_up = false;
mouse_over_music_volume_down = false;
sfx_volume = 5;
sfx_x = round(width*(1060.0/1440));
sfx_y = round(height*(422.0/900));
sfx_volume_x = sfx_x+round(width*(100.0/1440));
sfx_volume_up_y = sfx_y+round(height*(37.0/900));
sfx_volume_down_y = sfx_volume_up_y+round(height*(100.0/900));
mouse_over_sfx_volume_up = false;
mouse_over_sfx_volume_down = false;
credits_shown = false;
degree = new Degree();
volume = 0.04;
//********************************************************************************************************
//round(width*(.0/1440))) round(height*(.0/900))) round(width*(60.0/1440)))
//********************************************************************************************************
}
void draw() {
if (menu_state == "MAIN MENU") {
mainMenu();
changed = false;
} else if (menu_state == "CHARACTER MENU") {
characterMenu();
changed = true;
} else if (menu_state == "LEVEL MENU") {
levelMenu();
changed = true;
} else if (menu_state == "SETTINGS MENU") {
settingsMenu();
changed = true;
} else if (menu_state == "CREDITS MENU") {
creditsMenu();
changed = true;
}
displayFps();
displayCoordinates();
}
void mousePressed() {
try {
if (menu_state == "MAIN MENU") { //MAIN MENU
if (mouse_over_start_game) { //click on START GAME option
audioInput = AudioSystem.getAudioInputStream(sounds[2]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
if (!character_selected){
menu_state = "CHARACTER MENU";
} else {
level_1 = true;
menu_state = "LEVEL MENU";
}
} else if (mouse_over_settings) { //click on SETTINGS option
audioInput = AudioSystem.getAudioInputStream(sounds[2]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
menu_state = "SETTINGS MENU";
} else if (mouse_over_exit_game) { //click on EXIT GAME option
music.stop();
exit();
System.exit(0);
}
} else if (menu_state == "CHARACTER MENU") { //CHARACTER MENU
if (mouse_over_return) { //click on RETURN option
audioInput = AudioSystem.getAudioInputStream(sounds[0]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
if (!character_selected){
character_temp = 0;
menu_state = "MAIN MENU";
} else {
character_temp = character;
level_1 = true;
menu_state = "LEVEL MENU";
}
} else if (mouse_over_next_character) { //click on NEXT CHARACTER option
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
if (character_temp+1 == characters.length) {
character_temp = 0;
} else {
character_temp++;
}
} else if (mouse_over_previous_character) { //click on PREVIOUS CHARACTER option
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
if (character_temp-1 == -1) {
character_temp = characters.length-1;
} else {
character_temp--;
}
} else if (mouse_over_select) { //click on SELECT option
audioInput = AudioSystem.getAudioInputStream(sounds[2]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
character = character_temp;
character_selected = true;
level_1 = true;
menu_state = "LEVEL MENU";
}
} else if (menu_state == "LEVEL MENU") { //LEVEL MENU
if (mouse_over_return) { //click on RETURN option
levelReset();
audioInput = AudioSystem.getAudioInputStream(sounds[2]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
menu_state = "MAIN MENU";
} else if (mouse_over_next_level) { //click on NEXT LEVEL option
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
if (level_1) {
level_1 = false;
level_2 = true;
} else if (level_2) {
level_2 = false;
level_3 = true;
} else if (level_3) {
level_3 = false;
level_4 = true;
}
} else if (mouse_over_previous_level) { //click on PREVIOUS LEVEL option
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
if (level_2) {
level_2 = false;
level_1 = true;
} else if (level_3) {
level_3 = false;
level_2 = true;
} else if (level_4) {
level_4 = false;
level_3 = true;
}
} else if (mouse_over_displayed_character) { //click on DISPLAYED CHARACTER option
levelReset();
menu_state = "CHARACTER MENU";
} else if (mouse_over_play) { //click on PLAY option
if (level_1) {
level = levels[0];
startGame();
} else if (level_2 && game.courses_collected >= 6) {
level = levels[1];
startGame();
} else if (level_3 && game.courses_collected >= 12) {
level = levels[2];
startGame();
} else if (level_4 && game.courses_collected >= 18) {
level = levels[3];
startGame();
}
}
} else if (menu_state == "SETTINGS MENU") { //SETTINGS MENU
if (mouse_over_return) { //click on RETURN option
audioInput = AudioSystem.getAudioInputStream(sounds[0]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
menu_state = "MAIN MENU";
} else if (mouse_over_display_fps) { //click on DISPLAY FPS option
if (!fps) {
fps = true;
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
} else {
fps = false;
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
}
} else if (mouse_over_display_hitboxes) { //click on DISPLAY HITBOXES option
if (!hitboxes) {
hitboxes = true;
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
} else {
hitboxes = false;
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
}
} else if (mouse_over_display_coordinates) { //click on DISPLAY COORDINATES option
if (!coordinates) {
coordinates = true;
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
} else {
coordinates = false;
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
}
} else if (mouse_over_master_volume_up) {
if (master_volume < 9) {
master_volume++;
mute = false;
if (!noMusic) musicVolume.setValue(1.2*(music_volume+master_volume-16));
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX) sfx.start();
}
} else if (mouse_over_master_volume_down) {
if (master_volume > 0) {
master_volume--;
if (master_volume == 0) {
mute = true;
musicVolume.setValue(-80);
} else {
if (!noMusic) musicVolume.setValue(1.2*(music_volume+master_volume-16));
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX) sfx.start();
}
}
} else if (mouse_over_music_volume_up) {
if (music_volume < 9) {
noMusic = false;
music_volume++;
if (!mute) musicVolume.setValue(1.2*(music_volume+master_volume-16));
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
}
} else if (mouse_over_music_volume_down) {
if (music_volume > 0) {
music_volume--;
if (music_volume == 0) {
noMusic = true;
musicVolume.setValue(-80);
} else {
if (!mute) musicVolume.setValue(1.2*(music_volume+master_volume-16));
}
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
}
} else if (mouse_over_sfx_volume_up) {
if (sfx_volume < 9) {
noSFX = false;
sfx_volume++;
audioInput = AudioSystem.getAudioInputStream(sounds[8]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!mute) sfx.start();
}
} else if (mouse_over_sfx_volume_down) {
if (sfx_volume > 0) {
sfx_volume--;
if (sfx_volume == 0) noSFX = true;
else {
audioInput = AudioSystem.getAudioInputStream(sounds[5]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!mute) sfx.start();
}
}
}
} else if (menu_state == "CREDITS MENU") { //CREDITS MENU
if (mouse_over_return) { //click on RETURN option
audioInput = AudioSystem.getAudioInputStream(sounds[0]);
sfx = AudioSystem.getClip();
sfx.open(audioInput);
sfxVolume = (FloatControl) sfx.getControl(FloatControl.Type.MASTER_GAIN);
sfxVolume.setValue(1.2*(sfx_volume+master_volume-16));
if (!noSFX && !mute) sfx.start();
credits_shown = true;
levelReset();
menu_state = "MAIN MENU";
}
}
}
catch(Exception e) {
e.printStackTrace();
}
}
void mainMenu() {
image(image_main_menu_background, 0, 0, width, height);
flag.draw();
printClouds();
if (hitboxes) {
fill(255, 0, 255); //pink
rect(start_game_x-round(width*(180.0/1440)), start_game_y-round(height*(53.0/900)), round(width*(360.0/1440)), round(height*(67.0/900))); //hitbox of START GAME button
rect(settings_x-round(width*(180.0/1440)), settings_y-round(height*(53.0/900)), round(width*(360.0/1440)), round(height*(67.0/900))); //hitbox of SETTINGS button
rect(exit_game_x-round(width*(180.0/1440)), exit_game_y-round(height*(53.0/900)), round(width*(360.0/1440)), round(height*(67.0/900))); //hitbox of EXIT GAME button
}
textSize(round(width*(60.0/1440)));
//check if the mouse is over the START GAME option
if (mouseX > start_game_x-round(width*(180.0/1440)) && mouseX < start_game_x+round(width*(180.0/1440)) && mouseY > start_game_y-round(height*(53.0/900)) && mouseY < start_game_y+round(height*(15.0/900))) {
mouse_over_start_game = true;
fill(255, 200, 45); //yellow
} else {
mouse_over_start_game = false;
fill(235, 15, 15); //red
}
text("START GAME", start_game_x, start_game_y);
//check if the mouse is over the SETTINGS option
if (mouseX > settings_x-round(width*(180.0/1440)) && mouseX < settings_x+round(width*(180.0/1440)) && mouseY > settings_y-round(height*(53.0/900)) && mouseY < settings_y+round(height*(15.0/900))) {
mouse_over_settings = true;
fill(255, 200, 45); //yellow
} else {
mouse_over_settings = false;
fill(235, 15, 15); //red
}
text("SETTINGS", settings_x, settings_y);
//check if the mouse is over the EXIT GAME option
if (mouseX > exit_game_x-round(width*(180.0/1440)) && mouseX < exit_game_x+round(width*(180.0/1440)) && mouseY > exit_game_y-round(height*(53.0/900)) && mouseY < exit_game_y+round(height*(15.0/900))) {
mouse_over_exit_game = true;
fill(255, 200, 45); //yellow
} else {
mouse_over_exit_game = false;
fill(235, 15, 15); //red
}
text("EXIT GAME", exit_game_x, exit_game_y);
}
void characterMenu() {
image(image_secondary_menu_background, 0, 0, width, height);
if (hitboxes) {
fill(255, 0, 255); //pink
rect(return_x-round(width*(131.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of RETURN to menu button
rect(character_x+round(width*(249.0/1440)), character_y-round(height*(65.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of NEXT CHARACTER button
rect(character_x-round(width*(380.0/1440)), character_y-round(height*(65.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of PREVIOUS CHARACTER button
rect(select_x-round(width*(185.0/1440)), select_y-round(height*(205.0/900)), round(width*(369.0/1440)), round(height*(130.0/900))); //hitbox of SELECT button
}
//check if the mouse is over the RETURN option
if (mouseX > return_x-round(width*(131.0/1440)) && mouseX < return_x && mouseY > return_y-round(height*(130.0/900)) && mouseY < return_y) {
mouse_over_return = true;
image(image_return_arrow_yellow, return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_return = false;
image(image_return_arrow_red, return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
//check if the mouse if over the NEXT CHARACTER option
if (mouseX > character_x+round(width*(249.0/1440)) && mouseX < character_x+round(width*(380.0/1440)) && mouseY > character_y-round(height*(65.0/900)) && mouseY < character_y+round(height*(65.0/900))) {
mouse_over_next_character = true;
image(image_right_arrow_yellow, character_x+round(width*(250.0/1440)), character_y-round(height*(65.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_next_character = false;
image(image_right_arrow_red, character_x+round(width*(250.0/1440)), character_y-round(height*(65.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
//check if the mouse if over the PREVIOUS CHARACTER option
if (mouseX > character_x-round(width*(380.0/1440)) && mouseX < character_x-round(width*(250.0/1440)) && mouseY > character_y-round(height*(65.0/900)) && mouseY < character_y+round(height*(65.0/900))) {
mouse_over_previous_character = true;
image(image_left_arrow_yellow, character_x-round(width*(380.0/1440)), character_y-round(height*(65.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_previous_character = false;
image(image_left_arrow_red, character_x-round(width*(380.0/1440)), character_y-round(height*(65.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
//check if the mouse if over the SELECT option
if (mouseX > select_x-round(width*(185.0/1440)) && mouseX < select_x+round(width*(249.0/1440)) && mouseY > select_y-round(height*(205.0/900)) && mouseY < select_y-round(height*(75.0/900))) {
mouse_over_select = true;
image(image_tabS_yellow, select_x-round(width*(180.0/1440)), select_y-round(height*(200.0/900)), round(width*(360.0/1440)), round(height*(120.0/900)));
fill(235, 15, 15); //red
} else {
mouse_over_select = false;
image(image_tabS_red, select_x-round(width*(180.0/1440)), select_y-round(height*(200.0/900)), round(width*(360.0/1440)), round(height*(120.0/900)));
fill(255, 200, 45); //yellow
}
textSize(round(width*(60.0/1440)*1.4));
text("SELECT", select_x, select_y-round(height*(115.0/900)));
//display tab
image(image_tab_blue1, character_x-round(width*(200.0/1440)), character_y-round(height*(200.0/900)), round(width*(400.0/1440)), round(height*(400.0/900)));
//display character
if (character_temp == 0) {
image(image_character0, character_x-round(width*(100.0/1440)), character_y-round(height*(220.0/900)), round(width*(192.0/1440)), round(height*(384.0/900)));
} else if (character_temp == 1) {
image(image_character1, character_x-round(width*(100.0/1440)), character_y-round(height*(220.0/900)), round(width*(192.0/1440)), round(height*(384.0/900)));
} else if (character_temp == 2) {
image(image_character2, character_x-round(width*(100.0/1440)), character_y-round(height*(220.0/900)), round(width*(192.0/1440)), round(height*(384.0/900)));
} else if (character_temp == 3) {
image(image_character3, character_x-round(width*(100.0/1440)), character_y-round(height*(220.0/900)), round(width*(192.0/1440)), round(height*(384.0/900)));
} else if (character_temp == 4) {
image(image_character4, character_x-round(width*(100.0/1440)), character_y-round(height*(220.0/900)), round(width*(192.0/1440)), round(height*(384.0/900)));
} else if (character_temp == 5) {
image(image_character5, character_x-round(width*(100.0/1440)), character_y-round(height*(220.0/900)), round(width*(192.0/1440)), round(height*(384.0/900)));
}
}
void levelMenu() {
image(image_secondary_menu_background, 0, 0, width, height);
year_locked = false;
if (hitboxes) {
fill(255, 0, 255); //pink
rect(return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of RETURN to menu button
rect(play_x-round(width*(200.0/1440)), play_y-round(height*(240.0/900)), round(width*(400.0/1440)), round(height*(160.0/900))); //hitbox of PLAY button
}
//check if the mouse is over the RETURN option
if (mouseX > return_x-round(width*(131.0/1440)) && mouseX < return_x && mouseY > return_y-round(height*(130.0/900)) && mouseY < return_y) {
mouse_over_return = true;
image(image_return_arrow_yellow, return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_return = false;
image(image_return_arrow_red, return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
//check if the mouse if over the PLAY option
if (mouseX > play_x-round(width*(205.0/1440)) && mouseX < play_x+round(width*(204.0/1440)) && mouseY > play_y-round(height*(245.0/900)) && mouseY < play_y-round(height*(75.0/900))) {
mouse_over_play = true;
image(image_tabS_yellow, play_x-round(width*(200.0/1440)), play_y-round(height*(240.0/900)), round(width*(400.0/1440)), round(height*(160.0/900)));
fill(235, 15, 15); //red
} else {
mouse_over_play = false;
image(image_tabS_red, play_x-round(width*(200.0/1440)), play_y-round(height*(240.0/900)), round(width*(400.0/1440)), round(height*(160.0/900)));
fill(255, 200, 45); //yellow
}
textSize(round(width*(60.0/1440)*2));
text("PLAY", play_x, play_y-round(height*(125.0/900)));
if (!level_4) { //if you are not being displayed the last level you have the option to view the NEXT one
if (hitboxes) {
fill(255, 0, 255); //pink
rect(next_level_x-round(width*(156.0/1440)), next_level_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of NEXT LEVEL button
}
//check if the mouse if over the NEXT LEVEL option
if (mouseX > next_level_x-round(width*(156.0/1440)) && mouseX < next_level_x-round(width*(26.0/1440)) && mouseY > next_level_y-round(height*(130.0/900)) && mouseY < next_level_y) {
mouse_over_next_level = true;
image(image_right_arrow_yellow, next_level_x-round(width*(155.0/1440)), next_level_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_next_level = false;
image(image_right_arrow_red, next_level_x-round(width*(155.0/1440)), next_level_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
}
if (!level_1) { //if you are not being displayed the first level you have the option to view the PREVIOUS one
if (hitboxes) {
fill(255, 0, 255); //pink
rect(previous_level_x+round(width*(25.0/1440)), previous_level_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of PREVIOUS LEVEL button
}
//check if the mouse if over the PREVIOUS LEVEL option
if (mouseX > previous_level_x+round(width*(25.0/1440)) && mouseX < previous_level_x+round(width*(155.0/1440)) && mouseY > previous_level_y-round(height*(130.0/900)) && mouseY < previous_level_y) {
mouse_over_previous_level = true;
image(image_left_arrow_yellow, previous_level_x+round(width*(25.0/1440)), previous_level_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_previous_level = false;
image(image_left_arrow_red, previous_level_x+round(width*(25.0/1440)), previous_level_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
}
fill(255, 255, 255); //white
textSize(round(width*(60.0/1440)));
if (level_1) {
level = levels[0];
mouse_over_previous_level = false;
image(image_thumb1, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
text("1st year", width/2, height/2+round(height*(70.0/900)));
} else if (level_2) {
level = levels[1];
text("2nd year", width/2, height/2+round(height*(70.0/900)));
if (game.courses_collected < 6) {
image(image_thumb2_locked, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
textSize(round(width*(60.0/1440)*3/5));
if (6 - game.courses_collected > 1) {
text("You need to pass " + (6 - game.courses_collected) + " more courses to unlock this year !", round(width*(720.0/1440)), round(height*(600.0/900)));
} else {
text("You need to pass 1 more course to unlock this year !", round(width*(720.0/1440)), round(height*(600.0/900)));
}
year_locked = true;
} else {
image(image_thumb2, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
}
} else if (level_3) {
level = levels[2];
text("3rd year", width/2, height/2+round(height*(70.0/900)));
if (game.courses_collected < 12) {
image(image_thumb3_locked, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
textSize(round(width*(60.0/1440)*3/5));
if (12 - game.courses_collected > 1) {
text("You need to pass " + (12 - game.courses_collected) + " more courses to unlock this year !", round(width*(720.0/1440)), round(height*(600.0/900)));
} else {
text("You need to pass 1 more course to unlock this year !", round(width*(720.0/1440)), round(height*(600.0/900)));
}
year_locked = true;
} else {
image(image_thumb3, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
}
} else if (level_4) {
level = levels[3];
mouse_over_next_level = false;
text("4th year", width/2, height/2+round(height*(70.0/900)));
if (game.courses_collected < 18) {
image(image_thumb4_locked, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
textSize(round(width*(60.0/1440)*3/5));
if (18 - game.courses_collected > 1) {
text("You need to pass " + (18 - game.courses_collected) + " more courses to unlock this year !", round(width*(720.0/1440)), round(height*(600.0/900)));
} else {
text("You need to pass 1 more course to unlock this year !", round(width*(720.0/1440)), round(height*(600.0/900)));
}
year_locked = true;
} else {
image(image_thumb4, round(width*(420.0/1440)), round(height*(100.0/900)), round(width*(600./1440)), round(height*(350.0/900)));
}
}
if (!year_locked) {
if (level.courses.length-level.courses_collected == 1) {
textSize(round(width*(60.0/1440)*3/4));
text("1 course left to pass !", round(width*(720./1440)), round(height*(600.0/900)));
} else if (level.courses_collected < level.courses.length) {
textSize(round(width*(60.0/1440)*3/4));
text(level.courses.length - level.courses_collected + " courses left to pass !", round(width*(720./1440)), round(height*(600.0/900)));
} else {
textSize(round(width*(60.0/1440)*3/5));
text("You have passed all the courses from this year !", round(width*(720./1440)), round(height*(595.0/900)));
}
}
image(image_course, round(width*(58.0/1440)), round(height*(188.0/900)), round(width*(32.0/1440)), round(height*(32.0/900)));
fill(220, 220, 220); //light grey
textSize(round(width*(60.0/1440)*0.4));
text("X", round(width*(106.0/1440)), round(height*(213.0/900)));
fill(255, 215, 0); //gold
textSize(round(width*(60.0/1440)*3/4));
textAlign(LEFT);
text(game.courses_collected, round(width*(122.0/1440)), round(height*(218.0/900)));
displayCharacter();
textAlign(CENTER);
}
void settingsMenu() {
image(image_secondary_menu_background, 0, 0, width, height);
textAlign(LEFT);
if (hitboxes) {
fill(255, 0, 255); //pink
rect(return_x-round(width*(131.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900))); //hitbox of RETURN to menu button
rect(round(width*(20.0/1440)), round(height*(20.0/900)), round(width*(50.0/1440)), round(height*(50.0/900))); //hitbox of DISPLAY FPS button
rect(round(width*(20.0/1440)), round(height*(80.0/900)), round(width*(50.0/1440)), round(height*(50.0/900))); //hitbox of DISPLAY HITBOXES button
rect(round(width*(20.0/1440)), round(height*(140.0/900)), round(width*(50.0/1440)), round(height*(50.0/900))); //hitbox of DISPLAY COORDINATES button
rect(master_volume_x, master_volume_up_y, round(width*(65.0/1440)), round(height*(33.0/900))); //hitbox of MASTER VOLUME UP button
rect(master_volume_x, master_volume_down_y, round(width*(65.0/1440)), round(height*(33.0/900))); //hitbox of MASTER VOLUME DOWN button
rect(music_volume_x, music_volume_up_y, round(width*(65.0/1440)), round(height*(33.0/900))); //hitbox of MUSIC VOLUME UP button
rect(music_volume_x, music_volume_down_y, round(width*(65.0/1440)), round(height*(33.0/900))); //hitbox of MUSIC VOLUME DOWN button
rect(sfx_volume_x, sfx_volume_up_y, round(width*(65.0/1440)), round(height*(33.0/900))); //hitbox of SFX VOLUME UP button
rect(sfx_volume_x, sfx_volume_down_y, round(width*(65.0/1440)), round(height*(33.0/900))); //hitbox of SFX VOLUME DOWN button
}
//check if the mouse is over the RETURN option
if (mouseX > return_x-round(width*(131.0/1440)) && mouseX < return_x && mouseY > return_y-round(height*(130.0/900)) && mouseY < return_y) {
mouse_over_return = true;
image(image_return_arrow_yellow, return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
} else {
mouse_over_return = false;
image(image_return_arrow_red, return_x-round(width*(130.0/1440)), return_y-round(height*(130.0/900)), round(width*(130.0/1440)), round(height*(130.0/900)));
}
//check if mouse is over DISPLAY FPS option
if (mouseX > round(width*(20.0/1440)) && mouseX < round(width*(70.0/1440)) && mouseY > round(height*(20.0/900)) && mouseY < round(height*(70.0/900))) {
mouse_over_display_fps = true;
} else {
mouse_over_display_fps = false;
}
//check if mouse is over DISPLAY HITBOXES option
if (mouseX > round(width*(20.0/1440)) && mouseX < round(width*(70.0/1440)) && mouseY > round(height*(80.0/900)) && mouseY < round(height*(130.0/900))) {
mouse_over_display_hitboxes = true;
} else {
mouse_over_display_hitboxes = false;
}
//check if mouse is over DISPLAY COORDINATES option
if (mouseX > round(width*(20.0/1440)) && mouseX < round(width*(70.0/1440)) && mouseY > round(height*(140.0/900)) && mouseY < round(height*(190.0/900))) {
mouse_over_display_coordinates = true;
} else {
mouse_over_display_coordinates = false;
}
//check if mouse is over MASTER VOLUME UP option
if (mouseX > master_volume_x && mouseX < master_volume_x+round(width*(65.0/1440)) && mouseY > master_volume_up_y && mouseY < master_volume_up_y+round(height*(33.0/900))) {
mouse_over_master_volume_up = true;
} else {
mouse_over_master_volume_up = false;
}
//check if mouse is over MASTER VOLUME DOWN option
if (mouseX > master_volume_x && mouseX < master_volume_x+round(width*(65.0/1440)) && mouseY > master_volume_down_y && mouseY < master_volume_down_y+round(height*(33.0/900))) {
mouse_over_master_volume_down = true;
} else {
mouse_over_master_volume_down = false;
}
//check if mouse is over MUSIC VOLUME UP option
if (mouseX > music_volume_x && mouseX < music_volume_x+round(width*(65.0/1440)) && mouseY > music_volume_up_y && mouseY < music_volume_up_y+round(height*(33.0/900))) {
mouse_over_music_volume_up = true;
} else {
mouse_over_music_volume_up = false;
}
//check if mouse is over MUSIC VOLUME DOWN option
if (mouseX > music_volume_x && mouseX < music_volume_x+round(width*(65.0/1440)) && mouseY > music_volume_down_y && mouseY < music_volume_down_y+round(height*(33.0/900))) {
mouse_over_music_volume_down = true;
} else {
mouse_over_music_volume_down = false;
}
//check if mouse is over SFX VOLUME UP option
if (mouseX > sfx_volume_x && mouseX < sfx_volume_x+round(width*(65.0/1440)) && mouseY > sfx_volume_up_y && mouseY < sfx_volume_up_y+round(height*(33.0/900))) {
mouse_over_sfx_volume_up = true;
} else {
mouse_over_sfx_volume_up = false;
}
//check if mouse is over SFX VOLUME DOWN option
if (mouseX > sfx_volume_x && mouseX < sfx_volume_x+round(width*(65.0/1440)) && mouseY > sfx_volume_down_y && mouseY < sfx_volume_down_y+round(height*(33.0/900))) {
mouse_over_sfx_volume_down = true;
} else {
mouse_over_sfx_volume_down = false;
}
fill(255, 255, 255); //white
textSize(round(width*(60.0/1440)*0.8));
if (!fps) {
image(image_tab_black, round(width*(25.0/1440)), round(height*(25.0/900)), round(width*(40.0/1440)), round(height*(40.0/900)));
} else {
image(image_tab_white, round(width*(25.0/1440)), round(height*(25.0/900)), round(width*(40.0/1440)), round(height*(40.0/900)));
}
text("display fps", round(width*(80.0/1440)), round(height*(60.0/900)));
if (!hitboxes) {
image(image_tab_black, round(width*(25.0/1440)), round(height*(85.0/900)), round(width*(40.0/1440)), round(height*(40.0/900)));
} else {
image(image_tab_white, round(width*(25.0/1440)), round(height*(85.0/900)), round(width*(40.0/1440)), round(height*(40.0/900)));
}
text("display hitboxes", round(width*(80.0/1440)), round(height*(120.0/900)));
if (!coordinates) {
image(image_tab_black, round(width*(25.0/1440)), round(height*(145.0/900)), round(width*(40.0/1440)), round(height*(40.0/900)));
} else {
image(image_tab_white, round(width*(25.0/1440)), round(height*(145.0/900)), round(width*(40.0/1440)), round(height*(40.0/900)));
}
text("display coordinates", round(width*(80.0/1440)), round(height*(180.0/900)));
image(image_up_arrowC, master_volume_x, master_volume_up_y, round(width*(65.0/1440)), round(height*(33.0/900)));
image(image_down_arrowC, master_volume_x, master_volume_down_y, round(width*(65.0/1440)), round(height*(33.0/900)));
fill(255);
text("master", master_x, master_y+round(height*(120.0/900)));
fill(0);
text(master_volume, master_volume_x+round(width*(17.0/1440)), master_y+round(height*(120.0/900)));
image(image_up_arrowC, music_volume_x, music_volume_up_y, round(width*(65.0/1440)), round(height*(33.0/900)));
image(image_down_arrowC, music_volume_x, music_volume_down_y, round(width*(65.0/1440)), round(height*(33.0/900)));
fill(255);
text("music", music_x, music_y+round(height*(120.0/900)));
fill(0);
text(music_volume, music_volume_x+round(width*(17.0/1440)), music_y+round(height*(120.0/900)));
image(image_up_arrowC, sfx_volume_x, sfx_volume_up_y, round(width*(65.0/1440)), round(height*(33.0/900)));
image(image_down_arrowC, sfx_volume_x, sfx_volume_down_y, round(width*(65.0/1440)), round(height*(33.0/900)));
fill(255);
text("sfx", sfx_x, sfx_y+round(height*(120.0/900)));
fill(0);
text(sfx_volume, sfx_volume_x+round(width*(17.0/1440)), sfx_y+round(height*(120.0/900)));
textAlign(CENTER);