From 334a0dc1b0cd1c3847bb539d1174a552c81891bc Mon Sep 17 00:00:00 2001 From: mogami Date: Wed, 24 Jul 2002 07:00:55 +0000 Subject: [PATCH] =?utf8?q?=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3?= =?utf8?q?=E8=A8=AD=E5=AE=9A'=3D'=E3=81=A7=E3=80=81=E3=83=81=E3=83=BC?= =?utf8?q?=E3=83=88=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=82h?= =?utf8?q?jkl=E3=81=A7=E5=A4=89=E3=81=88=E3=82=89=E3=82=8C=E3=82=8B?= =?utf8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F=E3=80=82=20?= =?utf8?q?=E3=81=82=E3=81=A8=E3=80=81hjkl=E3=82=92=E3=83=8F=E3=83=BC?= =?utf8?q?=E3=83=89=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AB=E3=81=9B=E3=81=9A?= =?utf8?q?=E3=81=A1=E3=82=83=E3=82=93=E3=81=A8keymap=E8=A8=AD=E5=AE=9A?= =?utf8?q?=E3=81=AB=E3=81=97=E3=81=9F=E3=81=8C=E3=81=86=E3=82=88=E3=81=86?= =?utf8?q?=E3=81=AB=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd4.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/cmd4.c b/src/cmd4.c index a89df2339..e1daae89f 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -1496,6 +1496,8 @@ static void do_cmd_options_cheat(cptr info) /* Interact with the player */ while (TRUE) { + int dir; + /* Prompt XXX XXX XXX */ #ifdef JP sprintf(buf, "%s ( ¥ê¥¿¡¼¥ó¤Ç¼¡¤Ø, y/n ¤Ç¥»¥Ã¥È, ESC ¤Ç·èÄê )", info); @@ -1539,6 +1541,14 @@ static void do_cmd_options_cheat(cptr info) /* Get a key */ ch = inkey(); + /* + * HACK - Try to translate the key into a direction + * to allow using the roguelike keys for navigation. + */ + dir = get_keymap_dir(ch); + if ((dir == 2) || (dir == 4) || (dir == 6) || (dir == 8)) + ch = I2D(dir); + /* Analyze */ switch (ch) { @@ -1798,6 +1808,8 @@ void do_cmd_options_aux(int page, cptr info) /* Interact with the player */ while (TRUE) { + int dir; + /* Prompt XXX XXX XXX */ #ifdef JP sprintf(buf, "%s ( ¥ê¥¿¡¼¥ó¤Ç¼¡¤Ø, y/n ¤Ç¥»¥Ã¥È, ESC ¤Ç·èÄê ) ", info); @@ -1831,12 +1843,21 @@ void do_cmd_options_aux(int page, cptr info) if ((page == PAGE_AUTODESTROY) && (k > 2)) l = 3; else l = 0; + /* Hilite current option */ move_cursor(k + 2 + l, 50); /* Get a key */ ch = inkey(); + /* + * HACK - Try to translate the key into a direction + * to allow using the roguelike keys for navigation. + */ + dir = get_keymap_dir(ch); + if ((dir == 2) || (dir == 4) || (dir == 6) || (dir == 8)) + ch = I2D(dir); + /* Analyze */ switch (ch) { @@ -1847,8 +1868,6 @@ void do_cmd_options_aux(int page, cptr info) case '-': case '8': - case 'k': - case 'K': { k = (n + k - 1) % n; break; @@ -1858,8 +1877,6 @@ void do_cmd_options_aux(int page, cptr info) case '\n': case '\r': case '2': - case 'j': - case 'J': { k = (k + 1) % n; break; @@ -1868,8 +1885,6 @@ void do_cmd_options_aux(int page, cptr info) case 'y': case 'Y': case '6': - case 'l': - case 'L': { (*option_info[opt[k]].o_var) = TRUE; k = (k + 1) % n; @@ -1879,8 +1894,6 @@ void do_cmd_options_aux(int page, cptr info) case 'n': case 'N': case '4': - case 'h': - case 'H': { (*option_info[opt[k]].o_var) = FALSE; k = (k + 1) % n; -- 2.11.0