diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-09-28 23:25:14 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-09-28 23:25:14 +0800 |
commit | 13730807f72018b51e0e04d6a61aeac579e0d556 (patch) | |
tree | b8ae01386fb1930dec84e0b7097ce749e68065b9 | |
parent | 6d62ad2fa1eefa04d0f4de349ea803e8a4609d2e (diff) | |
download | pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.tar pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.tar.gz pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.tar.bz2 pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.tar.lz pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.tar.xz pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.tar.zst pttbbs-13730807f72018b51e0e04d6a61aeac579e0d556.zip |
angel: don't wait for valid keys in help screen, since many people may fail in
copy-pasting URLs and that will trigger help screen and then stuck on any input
except 'h'.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5402 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/angel.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/pttbbs/mbbsd/angel.c b/pttbbs/mbbsd/angel.c index 9e2d0554..d213a9cb 100644 --- a/pttbbs/mbbsd/angel.c +++ b/pttbbs/mbbsd/angel.c @@ -625,30 +625,31 @@ CallAngel(){ void pressanykey_or_callangel(){ int ch; + int w = t_columns - 2; // see vtuikit.c, SAFE_MAX_COL - if (!HasUserPerm(PERM_LOGINOK)) - { + if (!HasUserPerm(PERM_LOGINOK)) { pressanykey(); return; } // TODO use visio API instead. - outmsg( - VCLR_PAUSE_PAD " ▄▄▄▄ " - ANSI_COLOR(32) "H " ANSI_COLOR(36) "呼叫小天使" ANSI_COLOR(34) - " ▄▄▄▄" ANSI_COLOR(37;44) " 請按 " ANSI_COLOR(36) "空白鍵 " - ANSI_COLOR(37) "繼續 " ANSI_COLOR(1;34) - "▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " ANSI_RESET); - do { - ch = vkey(); - if (ch == 'h' || ch == 'H'){ - CallAngel(); - break; - } - } while ((ch != ' ') && (ch != KEY_LEFT) && (ch != '\r') && (ch != '\n')); + move(b_lines, 0); clrtoeol(); + + // message string length = 38 + outs(VCLR_PAUSE_PAD " "); + w -= 1 + 38; + vpad(w / 2, VMSG_PAUSE_PAD); + outs(VCLR_PAUSE " 請按 " ANSI_COLOR(36) "空白鍵" + VCLR_PAUSE " 繼續,或 " ANSI_COLOR(36) "H" + VCLR_PAUSE " 呼叫小天使協助 " VCLR_PAUSE_PAD); + vpad(w - w / 2, VMSG_PAUSE_PAD); + outs(" " ANSI_RESET); + + if (tolower(vkey()) == 'h') + CallAngel(); + move(b_lines, 0); clrtoeol(); - refresh(); } #endif // PLAY_ANGEL |