Rudimentary key rebinding in game options

Currently shown only in the full options list, as it's not
quite complete. (For example, it doesn't handle movement commands,
or the getpos keys)
This commit is contained in:
Pasi Kallinen
2022-08-04 14:00:47 +03:00
parent b5acfc5c3f
commit 4ff9537b0d
5 changed files with 209 additions and 0 deletions

View File

@@ -7567,6 +7567,28 @@ optfn_o_autopickup_exceptions(
return optn_ok;
}
static int
optfn_o_bind_keys(
int optidx UNUSED, int req, boolean negated UNUSED,
char *opts, char *op UNUSED)
{
if (req == do_init) {
return optn_ok;
}
if (req == do_set) {
}
if (req == get_val) {
if (!opts)
return optn_err;
Sprintf(opts, n_currently_set, count_bind_keys());
return optn_ok;
}
if (req == do_handler) {
handler_rebind_keys();
}
return optn_ok;
}
static int
optfn_o_menu_colors(int optidx UNUSED, int req, boolean negated UNUSED,
char *opts, char *op UNUSED)