()
| 434 | static Command Main_Draw = (List<String> args) -> Main_Draw(); |
| 435 | |
| 436 | private static void Main_Draw() { |
| 437 | int i; |
| 438 | int w, h; |
| 439 | int ystart; |
| 440 | int xoffset; |
| 441 | int widest = -1; |
| 442 | int totalheight = 0; |
| 443 | String litname; |
| 444 | String[] names = { "m_main_game", "m_main_multiplayer", |
| 445 | "m_main_options", "m_main_video", "m_main_quit" }; |
| 446 | Dimension dim = new Dimension(); |
| 447 | |
| 448 | for (i = 0; i < names.length; i++) { |
| 449 | ClientGlobals.re.DrawGetPicSize(dim, names[i]); |
| 450 | w = dim.width; |
| 451 | h = dim.height; |
| 452 | |
| 453 | if (w > widest) |
| 454 | widest = w; |
| 455 | totalheight += (h + 12); |
| 456 | } |
| 457 | |
| 458 | ystart = (ClientGlobals.viddef.getHeight() / 2 - 110); |
| 459 | xoffset = (ClientGlobals.viddef.getWidth() - widest + 70) / 2; |
| 460 | |
| 461 | for (i = 0; i < names.length; i++) { |
| 462 | if (i != m_main_cursor) |
| 463 | ClientGlobals.re.DrawPic(xoffset, ystart + i * 40 + 13, names[i]); |
| 464 | } |
| 465 | |
| 466 | //strcat(litname, "_sel"); |
| 467 | litname = names[m_main_cursor] + "_sel"; |
| 468 | ClientGlobals.re.DrawPic(xoffset, ystart + m_main_cursor * 40 + 13, litname); |
| 469 | |
| 470 | DrawCursor(xoffset - 25, ystart + m_main_cursor * 40 + 11, |
| 471 | (int) ((ClientGlobals.cls.realtime / 100)) % NUM_CURSOR_FRAMES); |
| 472 | |
| 473 | ClientGlobals.re.DrawGetPicSize(dim, "m_main_plaque"); |
| 474 | w = dim.width; |
| 475 | h = dim.height; |
| 476 | ClientGlobals.re.DrawPic(xoffset - 30 - w, ystart, "m_main_plaque"); |
| 477 | |
| 478 | ClientGlobals.re.DrawPic(xoffset - 30 - w, ystart + h + 5, "m_main_logo"); |
| 479 | } |
| 480 | |
| 481 | static keyfunc_t Main_Key = new keyfunc_t() { |
| 482 | public String execute(int key) { |
no test coverage detected