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