From: mogami Date: Mon, 12 Aug 2002 07:19:15 +0000 (+0000) Subject: 自動拾いエディタの1行目の説明書きに、検索コマンドを追加。 X-Git-Tag: v2.1.2~1892 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f4c625e350074ce133f0dac6f307c380dd774d15;p=hengband%2Fhengband.git 自動拾いエディタの1行目の説明書きに、検索コマンドを追加。 検索文字列を指定する前に n や N を押したときにメッセージを出すようにした。 --- diff --git a/src/autopick.c b/src/autopick.c index 16ff1e89b..9e641ebe5 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -2478,6 +2478,7 @@ static cptr ctrl_command_desc[] = #define DIRTY_MODE 0x04 #define DIRTY_SCREEN 0x08 #define DIRTY_NOT_FOUND 0x10 +#define DIRTY_NO_SEARCH 0x20 /* * In-game editor of Object Auto-picker/Destoryer @@ -2695,18 +2696,18 @@ void do_cmd_edit_autopick(void) if (edit_mode) prt("^Q ESC ¤Ç¥³¥Þ¥ó¥É¥â¡¼¥É¤Ø°Ü¹Ô¡¢Ä̾ï¤Îʸ»ú¤Ï¤½¤Î¤Þ¤ÞÆþÎÏ", 0, 0); else - prt("q _ ¤Ç½ªÎ»¡¢hjkl2468 ¤Ç°ÜÆ°¡¢^Q a i ¤ÇÆþÎϥ⡼¥É", 0, 0); + prt("q _ ¤Ç½ªÎ»¡¢hjkl2468 ¤Ç°ÜÆ°¡¢^Q a i ¤ÇÆþÎϥ⡼¥É¡¢/ n N ¤Ç¸¡º÷", 0, 0); #else if (edit_mode) prt("Press ^Q ESC to command mode, any letters to insert", 0, 0); else - prt("Press q _ to quit, hjkl2468 to move, ^Q a i to insert mode", 0, 0); + prt(format("Press q _ to quit, %s to move, ^Q a i to insert mode, /nN to find", rogue_like_commands ? "hjkl" : "2468"), 0, 0); #endif /* Display current position */ prt (format("(%d,%d)", cx, cy), 0, 70); /* Display information when updated */ - if (old_cy != cy || (dirty_flags & (DIRTY_ALL | DIRTY_NOT_FOUND)) || dirty_line == cy) + if (old_cy != cy || (dirty_flags & (DIRTY_ALL | DIRTY_NOT_FOUND | DIRTY_NO_SEARCH)) || dirty_line == cy) { /* Clear information line */ Term_erase(0, hgt - 3 + 1, wid); @@ -2721,6 +2722,14 @@ void do_cmd_edit_autopick(void) prt(format("Pattern not found: %s", search_str), hgt - 3 + 1, 0); #endif } + else if (dirty_flags & DIRTY_NO_SEARCH) + { +#ifdef JP + prt("¸¡º÷Ãæ¤Î¥Ñ¥¿¡¼¥ó¤¬¤¢¤ê¤Þ¤»¤ó('/'¤Ç¸¡º÷)¡£", hgt - 3 + 1, 0); +#else + prt("No pattern to search. (Press '/' to search.)", hgt - 3 + 1, 0); +#endif + } else if (lines_list[cy][0] == '#') { #ifdef JP @@ -3097,6 +3106,10 @@ void do_cmd_edit_autopick(void) { if (!search_for_string(lines_list, search_str, &cx, &cy, TRUE)) dirty_flags |= DIRTY_NOT_FOUND; } + else + { + dirty_flags |= DIRTY_NO_SEARCH; + } break; case 'N': if (search_o_ptr) @@ -3107,6 +3120,10 @@ void do_cmd_edit_autopick(void) { if (!search_for_string(lines_list, search_str, &cx, &cy, FALSE)) dirty_flags |= DIRTY_NOT_FOUND; } + else + { + dirty_flags |= DIRTY_NO_SEARCH; + } break; } }