MCPcopy Create free account
hub / github.com/NetHack/NetHack / qt_askname

Method qt_askname

outdated/win/Qt3/qt3_win.cpp:4619–4651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4617}
4618
4619void 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
4653void NetHackQtBind::qt_get_nh_event()
4654{

Callers

nothing calls this directly

Calls 7

get_saved_gamesFunction · 0.85
free_saved_gamesFunction · 0.85
clearlocksFunction · 0.85
nh_terminateFunction · 0.50
chooseMethod · 0.45
ChooseMethod · 0.45

Tested by

no test coverage detected