Qt menu hack
Prevent a small inventory menu as the first one shown from forcing all subsequent ones from being the same short height by forcing it to have room for at least 15 lines. Temporary hack until someone figures out why resizing the reused WIN_INVEN isn't working. Does not affect non-inventory menus which get created on demand and destroyed when done so don't need to change size to fit different contents.
This commit is contained in:
+5
-3
@@ -56,13 +56,15 @@ public:
|
||||
|
||||
virtual QWidget* Widget();
|
||||
|
||||
virtual void StartMenu();
|
||||
virtual void StartMenu(bool using_WIN_INVEN = false);
|
||||
virtual void AddMenu(int glyph, const ANY_P *identifier,
|
||||
char ch, char gch, int attr,
|
||||
const QString& str, unsigned itemflags);
|
||||
virtual void EndMenu(const QString& prompt);
|
||||
virtual int SelectMenu(int how, MENU_ITEM_P **menu_list);
|
||||
|
||||
bool is_invent; // using core's WIN_INVEN
|
||||
|
||||
public slots:
|
||||
void All();
|
||||
void ChooseNone();
|
||||
@@ -169,7 +171,7 @@ private:
|
||||
class NetHackQtMenuOrTextWindow : public NetHackQtWindow {
|
||||
private:
|
||||
NetHackQtWindow* actual;
|
||||
QWidget *parent;
|
||||
QWidget *parent;
|
||||
|
||||
public:
|
||||
NetHackQtMenuOrTextWindow(QWidget *parent = NULL);
|
||||
@@ -183,7 +185,7 @@ public:
|
||||
virtual void PutStr(int attr, const QString& text);
|
||||
|
||||
// Menu
|
||||
virtual void StartMenu();
|
||||
virtual void StartMenu(bool using_WIN_INVENT = false);
|
||||
virtual void AddMenu(int glyph, const ANY_P *identifier,
|
||||
char ch, char gch, int attr,
|
||||
const QString& str, unsigned itemflags);
|
||||
|
||||
Reference in New Issue
Block a user