MCPcopy Create free account
hub / github.com/NetHack/NetHack / Invert

Method Invert

win/Qt/qt_menu.cpp:772–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770}
771
772void NetHackQtMenuWindow::Invert()
773{
774 if (how == PICK_NONE)
775 return;
776
777 if (counting)
778 ClearCount(); // discard any pending count
779 for (int row = 0; row < itemcount; ++row) {
780 itemlist[row].preselected = false; // stale for all rows
781 if (!itemlist[row].Selectable()
782 || !menuitem_invert_test(0, itemlist[row].itemflags,
783 itemlist[row].selected))
784 continue;
785 ToggleSelect(row, false);
786 }
787 if (biggestcount > 0L) { // had one or more counts
788 UpdateCountColumn(-1L); // all counts are now gone
789 } else {
790 table->repaint();
791 }
792}
793
794void NetHackQtMenuWindow::Search()
795{

Callers

nothing calls this directly

Calls 3

menuitem_invert_testFunction · 0.85
repaintMethod · 0.60
SelectableMethod · 0.45

Tested by

no test coverage detected