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

Method plnamePlayVsQuit

win/Qt/qt_plsel.cpp:546–557  ·  view source on GitHub ↗

if plname[] is empty, disable [Play], otherwise [Play] is the default

Source from the content-addressed store, hash-verified

544
545// if plname[] is empty, disable [Play], otherwise [Play] is the default
546void NetHackQtPlayerSelector::plnamePlayVsQuit()
547{
548 if (*svp.plname) {
549 play_btn->setEnabled(true);
550 play_btn->setDefault(true);
551 //quit_btn->setDefault(false);
552 } else {
553 play_btn->setEnabled(false); // [Play] still visible but grayed out
554 //play_btn->setDefault(false);
555 quit_btn->setDefault(true);
556 }
557}
558
559// the line edit widget for the name field has received input
560void NetHackQtPlayerSelector::selectName(const QString& n)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected