| 792 | } |
| 793 | |
| 794 | void NetHackQtMenuWindow::Search() |
| 795 | { |
| 796 | if (how == PICK_NONE) |
| 797 | return; |
| 798 | |
| 799 | searching = true; |
| 800 | NetHackQtStringRequestor requestor(this, "Search for:"); |
| 801 | char line[BUFSZ]; |
| 802 | line[0] = '\0'; /* for EDIT_GETLIN */ |
| 803 | if (requestor.Get(line)) { |
| 804 | for (int i=0; i<itemcount; i++) { |
| 805 | if (itemlist[i].str.contains(line, Qt::CaseInsensitive)) |
| 806 | ToggleSelect(i, false); |
| 807 | } |
| 808 | } |
| 809 | searching = false; |
| 810 | } |
| 811 | |
| 812 | void NetHackQtMenuWindow::ClearSearch() |
| 813 | { |
nothing calls this directly
no test coverage detected