| 108 | // end temporary |
| 109 | |
| 110 | static /*inline*/ bool |
| 111 | interesting_command(unsigned indx, int cmds) |
| 112 | { |
| 113 | bool skip_wizard = !WizardMode || cmds == normal_cmds; |
| 114 | |
| 115 | // entry 0 is a no-op; don't bother displaying it in the command grid |
| 116 | if (indx == 0 && !strcmp("#", extcmdlist[indx].ef_txt)) |
| 117 | return false; |
| 118 | // treat '?' as both normal mode and debug mode |
| 119 | if (!strcmp("?", extcmdlist[indx].ef_txt)) |
| 120 | return true; |
| 121 | // some commands might have been compiled-out; don't show them |
| 122 | if ((extcmdlist[indx].flags & (CMD_NOT_AVAILABLE|INTERNALCMD)) != 0) |
| 123 | return false; |
| 124 | // if picking from normal mode-only don't show wizard mode commands |
| 125 | // or if picking from wizard mode-only don't show normal commands |
| 126 | if ((skip_wizard && (extcmdlist[indx].flags & WIZMODECMD) != 0) |
| 127 | || (cmds == wizard_cmds && (extcmdlist[indx].flags & WIZMODECMD) == 0)) |
| 128 | return false; |
| 129 | // autocomplete subset is essentially the traditional set of extended |
| 130 | // commands; many can be invoked by Alt+char but not by ordinary char |
| 131 | // or Ctrl+char; [X11's extended command selection uses this subset] |
| 132 | if (cmds == autocomplete_cmds |
| 133 | && (extcmdlist[indx].flags & AUTOCOMPLETE) == 0) |
| 134 | return false; |
| 135 | // if we've gotten here, this command isn't filtered away, so show it |
| 136 | return true; |
| 137 | } |
| 138 | |
| 139 | NetHackQtExtCmdRequestor::NetHackQtExtCmdRequestor(QWidget *parent) : |
| 140 | QDialog(parent), |
no outgoing calls
no test coverage detected