Qt: more '#' support
Add an entry for running an extended command to Qt's 'game' menu.
This commit is contained in:
@@ -1386,6 +1386,7 @@ Qt: [later] augment extended command selection dialog's Filter to add a
|
||||
fourth subset, those commands which autocomplete when typed for tty,
|
||||
typically commands with no keystroke or only meta character keystroke;
|
||||
that makes Filter useful in normal mode (much shorter list of choices)
|
||||
Qt: add '#' as "Extended-commands" to the 'game' dropdown menu
|
||||
tiles: male and female variations in monsters.txt; tested only with tile2bmp
|
||||
conversion utility so far; also supported by tilemap utility to
|
||||
generate tile.c
|
||||
|
||||
@@ -247,6 +247,7 @@ extern void cmdq_clear(void);
|
||||
extern char pgetchar(void);
|
||||
extern void pushch(char);
|
||||
extern void savech(char);
|
||||
extern int doextcmd(void);
|
||||
extern const char *key2extcmddesc(uchar);
|
||||
extern boolean bind_specialkey(uchar, const char *);
|
||||
extern void parseautocomplete(char *, boolean);
|
||||
|
||||
@@ -101,7 +101,6 @@ static int dotherecmdmenu(void);
|
||||
static int doprev_message(void);
|
||||
static int timed_occupation(void);
|
||||
static boolean can_do_extcmd(const struct ext_func_tab *);
|
||||
static int doextcmd(void);
|
||||
static int dotravel(void);
|
||||
static int dotravel_target(void);
|
||||
static int doclicklook(void);
|
||||
@@ -372,7 +371,7 @@ can_do_extcmd(const struct ext_func_tab *extcmd)
|
||||
}
|
||||
|
||||
/* here after # - now read a full-word command */
|
||||
static int
|
||||
int
|
||||
doextcmd(void)
|
||||
{
|
||||
int idx, retval;
|
||||
@@ -2091,7 +2090,8 @@ struct ext_func_tab extcmdlist[] = {
|
||||
{ '#', "#", "perform an extended command",
|
||||
doextcmd, IFBURIED | GENERALCMD | CMD_M_PREFIX, NULL },
|
||||
{ M('?'), "?", "list all extended commands",
|
||||
doextlist, IFBURIED | AUTOCOMPLETE | GENERALCMD | CMD_M_PREFIX, NULL },
|
||||
doextlist, IFBURIED | AUTOCOMPLETE | GENERALCMD | CMD_M_PREFIX,
|
||||
NULL },
|
||||
{ M('a'), "adjust", "adjust inventory letters",
|
||||
doorganize, IFBURIED | AUTOCOMPLETE, NULL },
|
||||
{ M('A'), "annotate", "name current level",
|
||||
|
||||
@@ -580,11 +580,13 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
|
||||
enum { OnDesktop=1, OnHandhelds=2 };
|
||||
struct Macro {
|
||||
QMenu* menu;
|
||||
const char* name;
|
||||
int flags;
|
||||
QMenu *menu;
|
||||
const char *name;
|
||||
int flags; // 1 desktop, 2 handheld, 3 either/both
|
||||
int (*funct)(void);
|
||||
} item[] = {
|
||||
{ game, 0, 3},
|
||||
{ game, "Extended-commands", 3, doextcmd },
|
||||
{ game, 0, 3},
|
||||
{ game, "Version", 3, doversion},
|
||||
{ game, "Compilation", 3, doextversion},
|
||||
|
||||
Reference in New Issue
Block a user