| 4617 | } |
| 4618 | |
| 4619 | void NetHackQtBind::qt_askname() |
| 4620 | { |
| 4621 | have_asked = TRUE; |
| 4622 | |
| 4623 | // We do it all here, and nothing in askname |
| 4624 | |
| 4625 | char** saved = get_saved_games(); |
| 4626 | int ch = -1; |
| 4627 | if ( saved && *saved ) { |
| 4628 | if ( splash ) splash->hide(); |
| 4629 | NetHackQtSavedGameSelector sgsel((const char**)saved); |
| 4630 | ch = sgsel.choose(); |
| 4631 | if ( ch >= 0 ) |
| 4632 | strcpy(svp.plname,saved[ch]); |
| 4633 | } |
| 4634 | free_saved_games(saved); |
| 4635 | |
| 4636 | switch (ch) { |
| 4637 | case -1: |
| 4638 | if ( splash ) splash->hide(); |
| 4639 | if (NetHackQtPlayerSelector(keybuffer).Choose()) |
| 4640 | return; |
| 4641 | case -2: |
| 4642 | break; |
| 4643 | default: |
| 4644 | return; |
| 4645 | } |
| 4646 | |
| 4647 | // Quit |
| 4648 | clearlocks(); |
| 4649 | qt_exit_nhwindows(0); |
| 4650 | nh_terminate(0); |
| 4651 | } |
| 4652 | |
| 4653 | void NetHackQtBind::qt_get_nh_event() |
| 4654 | { |
nothing calls this directly
no test coverage detected