Qt string requestor
Some enhancements to the widget used to get player input for getline() and also menu search and text window search. give caller control of [cancel] and [okay] button names; give caller a say in how wide the string input box should be instead of basing that on the length of the prompt string (needs more work...); use fixed-width font for displaying the user's input; clean up the widget layout a little bit. src/Makefile needs a dependency update for Qt (not included).
This commit is contained in:
@@ -754,7 +754,7 @@ char NetHackQtBind::qt_yn_function(const char *question_,
|
||||
void NetHackQtBind::qt_getlin(const char *prompt, char *line)
|
||||
{
|
||||
NetHackQtStringRequestor requestor(mainWidget(),prompt);
|
||||
if (!requestor.Get(line)) {
|
||||
if (!requestor.Get(line, BUFSZ, 40)) {
|
||||
Strcpy(line, "\033");
|
||||
// discard any input that Get() might have left pending
|
||||
keybuffer.Drain();
|
||||
|
||||
Reference in New Issue
Block a user