add support for MENU_ITEMFLAGS_SKIPINVERT

Able to test:
win/tty
win/win32
win/curses

Unable to test:
win/X11
win/Qt
win/Qt3
win/gem
win/gnome
This commit is contained in:
nhmall
2019-12-23 08:36:44 -05:00
parent c9bc2f5a2a
commit 7012e7046f
18 changed files with 63 additions and 35 deletions

View File

@@ -160,8 +160,9 @@ NetHackQtMenuWindow::MenuItem::~MenuItem()
}
void NetHackQtMenuWindow::AddMenu(int glyph, const ANY_P* identifier,
char ch, char gch, int attr, const QString& str, bool presel)
char ch, char gch, int attr, const QString& str, unsigned itemflags)
{
bool presel = (itemflags & MENU_ITEMFLAGS_SELECTED) != 0;
if (!ch && identifier->a_void!=0) {
// Supply a keyboard accelerator. Limited supply.
static char accel[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -180,6 +181,7 @@ void NetHackQtMenuWindow::AddMenu(int glyph, const ANY_P* identifier,
itemlist[itemcount].attr=attr;
itemlist[itemcount].str=str;
itemlist[itemcount].selected=presel;
itemlist[itemcount].itemflags=itemflags;
itemlist[itemcount].count=-1;
itemlist[itemcount].color = -1;
// Display the boulder symbol correctly