MCPcopy Create free account
hub / github.com/demoth/jake2 / Main_Key

Method Main_Key

client/src/main/java/jake2/client/Menu.java:487–535  ·  view source on GitHub ↗
(int key)

Source from the content-addressed store, hash-verified

485 };
486
487 private static String Main_Key(int key) {
488 String sound = menu_move_sound;
489
490 switch (key) {
491 case Key.K_ESCAPE:
492 PopMenu();
493 break;
494
495 case Key.K_KP_DOWNARROW:
496 case Key.K_DOWNARROW:
497 if (++m_main_cursor >= MAIN_ITEMS)
498 m_main_cursor = 0;
499 return sound;
500
501 case Key.K_KP_UPARROW:
502 case Key.K_UPARROW:
503 if (--m_main_cursor < 0)
504 m_main_cursor = MAIN_ITEMS - 1;
505 return sound;
506
507 case Key.K_KP_ENTER:
508 case Key.K_ENTER:
509 m_entersound = true;
510
511 switch (m_main_cursor) {
512 case 0:
513 Menu_Game_f();
514 break;
515
516 case 1:
517 Menu_Multiplayer_f();
518 break;
519
520 case 2:
521 Menu_Options_f();
522 break;
523
524 case 3:
525 Menu_Video_f();
526 break;
527
528 case 4:
529 Menu_Quit_f();
530 break;
531 }
532 }
533
534 return null;
535 }
536
537 static void Menu_Main_f() {
538 PushMenu((List<String> args) -> Main_Draw(), new keyfunc_t() {

Callers 1

executeMethod · 0.95

Calls 6

PopMenuMethod · 0.95
Menu_Game_fMethod · 0.95
Menu_Multiplayer_fMethod · 0.95
Menu_Options_fMethod · 0.95
Menu_Video_fMethod · 0.95
Menu_Quit_fMethod · 0.95

Tested by

no test coverage detected