?? menu.java
字號:
s_options_freelook_box.itemnames = yesno_names; s_options_crosshair_box.type = MTYPE_SPINCONTROL; s_options_crosshair_box.x = 0; s_options_crosshair_box.y = 110; s_options_crosshair_box.name = "crosshair"; s_options_crosshair_box.callback = new mcallback() { public void execute(Object o) { CrosshairFunc(o); } }; s_options_crosshair_box.itemnames = crosshair_names; /* * s_options_noalttab_box.type = MTYPE_SPINCONTROL; * s_options_noalttab_box.x = 0; s_options_noalttab_box.y = 110; * s_options_noalttab_box.name = "disable alt-tab"; * s_options_noalttab_box.callback = NoAltTabFunc; * s_options_noalttab_box.itemnames = yesno_names; */ s_options_joystick_box.type = MTYPE_SPINCONTROL; s_options_joystick_box.x = 0; s_options_joystick_box.y = 120; s_options_joystick_box.name = "use joystick"; s_options_joystick_box.callback = new mcallback() { public void execute(Object o) { JoystickFunc(o); } }; s_options_joystick_box.itemnames = yesno_names; s_options_customize_options_action.type = MTYPE_ACTION; s_options_customize_options_action.x = 0; s_options_customize_options_action.y = 140; s_options_customize_options_action.name = "customize controls"; s_options_customize_options_action.callback = new mcallback() { public void execute(Object o) { CustomizeControlsFunc(o); } }; s_options_defaults_action.type = MTYPE_ACTION; s_options_defaults_action.x = 0; s_options_defaults_action.y = 150; s_options_defaults_action.name = "reset defaults"; s_options_defaults_action.callback = new mcallback() { public void execute(Object o) { ControlsResetDefaultsFunc(o); } }; s_options_console_action.type = MTYPE_ACTION; s_options_console_action.x = 0; s_options_console_action.y = 160; s_options_console_action.name = "go to console"; s_options_console_action.callback = new mcallback() { public void execute(Object o) { ConsoleFunc(o); } }; ControlsSetMenuItemValues(); Menu_AddItem(s_options_menu, s_options_sfxvolume_slider); Menu_AddItem(s_options_menu, s_options_cdvolume_box); Menu_AddItem(s_options_menu, s_options_quality_list); // Menu_AddItem(s_options_menu, s_options_compatibility_list); Menu_AddItem(s_options_menu, s_options_sensitivity_slider); Menu_AddItem(s_options_menu, s_options_alwaysrun_box); Menu_AddItem(s_options_menu, s_options_invertmouse_box); Menu_AddItem(s_options_menu, s_options_lookspring_box); Menu_AddItem(s_options_menu, s_options_lookstrafe_box); Menu_AddItem(s_options_menu, s_options_freelook_box); Menu_AddItem(s_options_menu, s_options_crosshair_box); // Menu_AddItem(s_options_menu, s_options_joystick_box); Menu_AddItem(s_options_menu, s_options_customize_options_action); Menu_AddItem(s_options_menu, s_options_defaults_action); Menu_AddItem(s_options_menu, s_options_console_action); } static void Options_MenuDraw() { Banner("m_banner_options"); Menu_AdjustCursor(s_options_menu, 1); Menu_Draw(s_options_menu); } static String Options_MenuKey(int key) { return Default_MenuKey(s_options_menu, key); } static xcommand_t Menu_Options = new xcommand_t() { public void execute() { Menu_Options_f(); } }; static void Menu_Options_f() { Options_MenuInit(); PushMenu(new xcommand_t() { public void execute() { Options_MenuDraw(); } }, new keyfunc_t() { public String execute(int key) { return Options_MenuKey(key); } }); } /* * ======================================================================= * * VIDEO MENU * * ======================================================================= */ static xcommand_t Menu_Video = new xcommand_t() { public void execute() { Menu_Video_f(); } }; static void Menu_Video_f() { VID.MenuInit(); PushMenu(new xcommand_t() { public void execute() { VID.MenuDraw(); } }, new keyfunc_t() { public String execute(int key) { return VID.MenuKey(key); } }); } /* * ============================================================================= * * END GAME MENU * * ============================================================================= */ static int credits_start_time; static String creditsIndex[] = new String[256]; static String creditsBuffer; static String idcredits[] = { "+QUAKE II BY ID SOFTWARE", "", "+PROGRAMMING", "John Carmack", "John Cash", "Brian Hook", "", "+JAVA PORT BY BYTONIC", "Carsten Weisse", "Holger Zickner", "Rene Stoeckel", "", "+ART", "Adrian Carmack", "Kevin Cloud", "Paul Steed", "", "+LEVEL DESIGN", "Tim Willits", "American McGee", "Christian Antkow", "Paul Jaquays", "Brandon James", "", "+BIZ", "Todd Hollenshead", "Barrett (Bear) Alexander", "Donna Jackson", "", "", "+SPECIAL THANKS", "Ben Donges for beta testing", "", "", "", "", "", "", "+ADDITIONAL SUPPORT", "", "+LINUX PORT AND CTF", "Dave \"Zoid\" Kirsch", "", "+CINEMATIC SEQUENCES", "Ending Cinematic by Blur Studio - ", "Venice, CA", "", "Environment models for Introduction", "Cinematic by Karl Dolgener", "", "Assistance with environment design", "by Cliff Iwai", "", "+SOUND EFFECTS AND MUSIC", "Sound Design by Soundelux Media Labs.", "Music Composed and Produced by", "Soundelux Media Labs. Special thanks", "to Bill Brown, Tom Ozanich, Brian", "Celano, Jeff Eisner, and The Soundelux", "Players.", "", "\"Level Music\" by Sonic Mayhem", "www.sonicmayhem.com", "", "\"Quake II Theme Song\"", "(C) 1997 Rob Zombie. All Rights", "Reserved.", "", "Track 10 (\"Climb\") by Jer Sypult", "", "Voice of computers by", "Carly Staehlin-Taylor", "", "+THANKS TO ACTIVISION", "+IN PARTICULAR:", "", "John Tam", "Steve Rosenthal", "Marty Stratton", "Henk Hartong", "", "Quake II(tm) (C)1997 Id Software, Inc.", "All Rights Reserved. Distributed by", "Activision, Inc. under license.", "Quake II(tm), the Id Software name,", "the \"Q II\"(tm) logo and id(tm)", "logo are trademarks of Id Software,", "Inc. Activision(R) is a registered", "trademark of Activision, Inc. All", "other trademarks and trade names are", "properties of their respective owners.", null }; static String credits[] = idcredits; static String xatcredits[] = { "+QUAKE II MISSION PACK: THE RECKONING", "+BY", "+XATRIX ENTERTAINMENT, INC.", "", "+DESIGN AND DIRECTION", "Drew Markham", "", "+PRODUCED BY", "Greg Goodrich", "", "+PROGRAMMING", "Rafael Paiz", "", "+LEVEL DESIGN / ADDITIONAL GAME DESIGN", "Alex Mayberry", "", "+LEVEL DESIGN", "Mal Blackwell", "Dan Koppel", "", "+ART DIRECTION", "Michael \"Maxx\" Kaufman", "", "+COMPUTER GRAPHICS SUPERVISOR AND", "+CHARACTER ANIMATION DIRECTION", "Barry Dempsey", "", "+SENIOR ANIMATOR AND MODELER", "Jason Hoover", "", "+CHARACTER ANIMATION AND", "+MOTION CAPTURE SPECIALIST", "Amit Doron", "", "+ART", "Claire Praderie-Markham", "Viktor Antonov", "Corky Lehmkuhl", "", "+INTRODUCTION ANIMATION", "Dominique Drozdz", "", "+ADDITIONAL LEVEL DESIGN", "Aaron Barber", "Rhett Baldwin", "", "+3D CHARACTER ANIMATION TOOLS", "Gerry Tyra, SA Technology", "", "+ADDITIONAL EDITOR TOOL PROGRAMMING", "Robert Duffy", "", "+ADDITIONAL PROGRAMMING", "Ryan Feltrin", "", "+PRODUCTION COORDINATOR", "Victoria Sylvester", "", "+SOUND DESIGN", "Gary Bradfield", "", "+MUSIC BY", "Sonic Mayhem", "", "", "", "+SPECIAL THANKS", "+TO", "+OUR FRIENDS AT ID SOFTWARE", "", "John Carmack", "John Cash", "Brian Hook", "Adrian Carmack", "Kevin Cloud", "Paul Steed", "Tim Willits", "Christian Antkow", "Paul Jaquays", "Brandon James", "Todd Hollenshead", "Barrett (Bear) Alexander", "Dave \"Zoid\" Kirsch", "Donna Jackson", "", "", "", "+THANKS TO ACTIVISION", "+IN PARTICULAR:", "", "Marty Stratton", "Henk \"The Original Ripper\" Hartong", "Kevin Kraff", "Jamey Gottlieb", "Chris Hepburn", "", "+AND THE GAME TESTERS", "", "Tim Vanlaw", "Doug Jacobs", "Steven Rosenthal", "David Baker", "Chris Campbell", "Aaron Casillas", "Steve Elwell", "Derek Johnstone", "Igor Krinitskiy", "Samantha Lee", "Michael Spann", "Chris Toft", "Juan Valdes", "", "+THANKS TO INTERGRAPH COMPUTER SYTEMS", "+IN PARTICULAR:", "", "Michael T. Nicolaou", "", "", "Quake II Mission Pack: The Reckoning", "(tm) (C)1998 Id Software, Inc. All", "Rights Reserved. Developed by Xatrix", "Entertainment, Inc. for Id Software,", "Inc. Distributed by Activision Inc.", "under license. Quake(R) is a", "registered trademark of Id Software,", "Inc. Quake II Mission Pack: The", "Reckoning(tm), Quake II(tm), the Id", "Software name, the \"Q II\"(tm) logo", "and id(tm) logo are trademarks of Id", "Software, Inc. Activision(R) is a", "registered trademark of Activision,", "Inc. Xatrix(R) is a registered", "trademark of Xatrix Entertainment,", "Inc. All other trademarks and trade", "names are properties of their", "respective owners.", null }; static String roguecredits[] = { "+QUAKE II MISSION PACK 2: GROUND ZERO", "+BY", "+ROGUE ENTERTAINMENT, INC.", "", "+PRODUCED BY", "Jim Molinets", "", "+PROGRAMMING", "Peter Mack", "Patrick Magruder", "", "+LEVEL DESIGN", "Jim Molinets", "Cameron Lamprecht", "Berenger Fish", "Robert Selitto", "Steve Tietze", "Steve Thoms", "", "+ART DIRECTION", "Rich Fleider", "", "+ART", "Rich Fleider", "Steve Maines", "Won Choi", "", "+ANIMATION SEQUENCES", "Creat Studios", "Steve Maines", "", "+ADDITIONAL LEVEL DESIGN", "Rich Fleider", "Steve Maines", "Peter Mack", "", "+SOUND", "James Grunke", "", "+GROUND ZERO THEME", "+AND", "+MUSIC BY", "Sonic Mayhem", "", "+VWEP MODELS", "Brent \"Hentai\" Dill", "", "", "", "+SPECIAL THANKS", "+TO", "+OUR FRIENDS AT ID SOFTWARE", "", "John Carmack", "John Cash", "Brian Hook", "Adrian Carmack", "Kevin Cloud", "Paul Steed", "Tim Willits", "Christian Antkow", "Paul Jaquays", "Brandon James", "Todd Hollenshead", "Barrett (Bear) Alexander", "Katherine Anna Kang", "Donna Jackson", "Dave \"Zoid\" Kirsch", "", "", "", "+THANKS TO ACTIVISION", "+IN PARTICULAR:", "", "Marty Stratton", "Henk Hartong", "Mitch Lasky", "Steve Rosenthal", "Steve Elwell", "", "+AND THE GAME TESTERS", "", "The Ranger Clan", "Dave \"Zoid\" Kirsch", "Nihilistic Software", "Robert Duffy", "", "And Countless Others", "", "", "", "Quake II Mission Pack 2: Ground Zero", "(tm) (C)1998 Id Software, Inc. All", "Rights Reserved. Developed by Rogue", "Entertainment, Inc. for Id Software,", "Inc. Distributed by Activision Inc.", "under license. Quake(R) is a", "registered trademark of Id Software,", "Inc. Quake II Mission Pack 2: Ground", "Zero(tm), Quake II(tm), the Id", "Software name, the \"Q II\"(tm) logo", "and id(tm) logo are trademarks of Id", "Software, Inc. Activision(R) is a", "registered trademark of Activision,", "Inc. Rogue(R) is a registered", "trademark of Rogue Entertainment,", "Inc. All other trademarks and trade", "names are properties of their", "respective owners.", null }; public static void Credits_MenuDraw() { int i, y; /* * * draw the credits */ for (i = 0, y = (int) (viddef.height - ((cls.realtime - credits_start_time) / 40.0F)); credits[i] != null && y < viddef.height; y += 10, i++) { int j, stringoffset = 0; boolean bold = false; if (y <= -8) continue; if (credits[i].length() > 0 && credits[i].charAt(0) == '+') { bold = true; stringoffset = 1; } else { bold = false; stringoffset = 0; } for (j = 0; j + stringoffset < credits[i].length(); j++) { int x; x = (viddef.width - credits[i].length() * 8 - stringoffset * 8) / 2 + (j + stringoffset) * 8; if (bold) re .DrawChar(x, y, credits[i].charAt(j + stringoffset) + 128); else re.DrawChar(x, y, credits[i].charAt(j + stringoffset)); } } if (y < 0) credits_start_time = cls.realtime; } public static String Credits_Key(int key) { switch (key) { case K_ESCAPE: if (creditsBuffer != null) //FS.FreeFile(creditsBuffer); ; PopMenu(); break; } return menu_out_sound; } static xcommand_t Menu_Credits = new xcommand_t() { public void execute() { Menu_Credits_f(); } }; static void Menu_Credits_f() { int n; int isdeveloper = 0; byte b[] = FS.LoadFile("credits"); if (b != null) { creditsBuffer = new String(b); String line[] = creditsBuffer.split("\r\n"); for (n = 0; n < line.length; n++) { creditsIndex[n] = line[n]; } creditsIndex[n] = null; credits = creditsIndex; } else { isdeveloper = FS.Developer_searchpath(1); if (isdeveloper == 1) // xatrix credits = xatcredits; else if (isdeveloper == 2) // ROGUE credits = roguecredits; else { credits = idcredits; } } credits_start_time = cls.realtime; PushMenu(new xcommand_t() { public void execute() { Credits_MenuDraw(); } }, new keyfunc_t() { public String execute(int key) { return Credits_Key(key); } }); } /* * ============================================================================= * * GAME MENU
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -