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

Method selectName

win/Qt/qt_plsel.cpp:560–570  ·  view source on GitHub ↗

the line edit widget for the name field has received input

Source from the content-addressed store, hash-verified

558
559// the line edit widget for the name field has received input
560void NetHackQtPlayerSelector::selectName(const QString& n)
561{
562 const char *name_str = n.toLatin1().constData();
563 // skip any leading spaces
564 // (it would be better to set up a validator that rejects leading spaces)
565 while (*name_str == ' ')
566 ++name_str;
567 str_copy(svp.plname, name_str, PL_NSIZ);
568 // possibly enable or disable the [Play] button
569 plnamePlayVsQuit();
570}
571
572void NetHackQtPlayerSelector::selectRole(int crow, int ccol,
573 int prow, int pcol)

Callers

nothing calls this directly

Calls 1

str_copyFunction · 0.85

Tested by

no test coverage detected