Make "black" characters visible.

Stop RIP window maximizing (C syntax!).
Make Cancel button more sensible.
This commit is contained in:
warwick
2004-07-01 18:21:51 +00:00
parent c91ac3274c
commit 5d72e0be52
3 changed files with 37 additions and 16 deletions
+8 -5
View File
@@ -1606,7 +1606,7 @@ const QPen& nhcolor_to_pen(int c)
static QPen* pen=0;
if ( !pen ) {
pen = new QPen[17];
pen[0] = Qt::black;
pen[0] = QColor(24,24,24); // "black" on black
pen[1] = Qt::red;
pen[2] = QColor(0,191,0);
pen[3] = QColor(127,127,0);
@@ -1622,7 +1622,7 @@ const QPen& nhcolor_to_pen(int c)
pen[13] = QColor(255,127,255);
pen[14] = QColor(127,255,255);
pen[15] = Qt::white;
pen[16] = Qt::black;
pen[16] = QColor(24,24,24); // "black" on black
}
return pen[c];
@@ -2859,7 +2859,7 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list)
how=h;
ok->setEnabled(how!=PICK_ONE);ok->setDefault(how!=PICK_ONE);
cancel->setEnabled(how!=PICK_NONE);
cancel->setEnabled(TRUE);
all->setEnabled(how==PICK_ANY);
none->setEnabled(how==PICK_ANY);
invert->setEnabled(how==PICK_ANY);
@@ -2922,7 +2922,10 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list)
keysource.GetAscii();
*menu_list=0;
if (result>0 && how!=PICK_NONE) {
if (how==PICK_NONE)
return result==0 ? -1 : 0;
if (result>0) {
if (how==PICK_ONE) {
int i;
for (i=0; i<itemcount && !item[i].selected; i++)
@@ -3377,7 +3380,7 @@ void NetHackQtTextWindow::Display(bool block)
rip.hide();
}
int mh = QApplication::desktop()->height()*3/5;
if ( qt_compact_mode && lines->TotalHeight() > mh || use_rip ) {
if ( qt_compact_mode && (lines->TotalHeight() > mh || use_rip) ) {
// big, so make it fill
showMaximized();
} else {