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:
+7
-4
@@ -19,10 +19,13 @@ private:
|
||||
QPushButton* cancel;
|
||||
|
||||
public:
|
||||
NetHackQtStringRequestor(QWidget *parent, const char* p,const char* cancelstr="Cancel");
|
||||
void SetDefault(const char*);
|
||||
bool Get(char* buffer, int maxchar=80);
|
||||
virtual void resizeEvent(QResizeEvent*);
|
||||
NetHackQtStringRequestor(QWidget *parent, const char *p,
|
||||
const char *cancelstr = "Cancel",
|
||||
const char *okaystr = "Okay");
|
||||
void SetDefault(const char *);
|
||||
// maxchar is size of buffer[], minchar is size of line edit widget
|
||||
bool Get(char *buffer, int maxchar = 80, int minchar = 20);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
};
|
||||
|
||||
} // namespace nethack_qt_
|
||||
|
||||
Reference in New Issue
Block a user