diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-05 17:45:48 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-05 17:45:48 +0800 |
commit | fbdd7cbf2c444d251ff0c6826ef952e681baaa2c (patch) | |
tree | 27bdcbddff63f6428a0df8c70894a410bc5167da | |
parent | fad6d5dd743843705e3a42da7a80b5bebc009bcb (diff) | |
download | pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.tar pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.tar.gz pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.tar.bz2 pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.tar.lz pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.tar.xz pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.tar.zst pttbbs-fbdd7cbf2c444d251ff0c6826ef952e681baaa2c.zip |
- add some grayout effects, and general code improvement
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3638 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/common.h | 4 | ||||
-rw-r--r-- | mbbsd/bbs.c | 2 | ||||
-rw-r--r-- | mbbsd/edit.c | 2 | ||||
-rw-r--r-- | mbbsd/kaede.c | 33 | ||||
-rw-r--r-- | mbbsd/pmore.c | 4 | ||||
-rw-r--r-- | mbbsd/talk.c | 2 | ||||
-rw-r--r-- | mbbsd/user.c | 1 |
7 files changed, 24 insertions, 24 deletions
diff --git a/include/common.h b/include/common.h index 59fd0fb7..b8d195d3 100644 --- a/include/common.h +++ b/include/common.h @@ -100,8 +100,8 @@ #define MSG_POSTER_LEN (78) #define MSG_POSTER ANSI_COLOR(34;46) " 文章選讀 "\ ANSI_COLOR(31;47) " (y)" ANSI_COLOR(30) "回信"\ - ANSI_COLOR(31) "(X)" ANSI_COLOR(30) "推文"\ - ANSI_COLOR(31) "(x)" ANSI_COLOR(30) "轉錄 "\ + ANSI_COLOR(31) "(X%)" ANSI_COLOR(30) "推文"\ + ANSI_COLOR(31) "(x)" ANSI_COLOR(30) "轉錄 "\ ANSI_COLOR(31) "(=[]<>)" ANSI_COLOR(30) "相關主題 "\ ANSI_COLOR(31) "(/?a)" ANSI_COLOR(30) "搜尋標題/作者 "\ ANSI_COLOR(31) "(V)" ANSI_COLOR(30) "投票 "\ diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 2bd82a21..e236fb13 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -3330,6 +3330,8 @@ b_config(void) int touched = 0, finished = 0; bp = getbcache(currbid); + grayout_lines(0, b_lines -14, 0); + while(!finished) { move(b_lines - 14, 0); clrtobot(); diff --git a/mbbsd/edit.c b/mbbsd/edit.c index c2bdfe6a..a0e7dac2 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -2095,6 +2095,7 @@ display_textline_internal(textline_t *p, int i) if (!p) { outc('~'); + outs(ANSI_CLRTOEND); return; } @@ -3334,6 +3335,7 @@ vedit(char *fpath, int saveheader, int *islocal) #endif // PMORE_USE_ASCII_MOVIE edit_outs_attr(&curr_buf->currline->data[curr_buf->edit_margin], attr); } + outs(ANSI_RESET ANSI_CLRTOEND); edit_msg(); } } /* redraw */ diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c index bc08ae3d..1dd8ba41 100644 --- a/mbbsd/kaede.c +++ b/mbbsd/kaede.c @@ -22,6 +22,10 @@ Ptt_prints(char *str, size_t size, int mode) strlcpy(strbuf+w, cuser.userid, size-w); w += strlen(strbuf+w); break; + case 'n': + strlcpy(strbuf+w, cuser.nickname, size-w); + w += strlen(strbuf+w); + break; case 't': strlcpy(strbuf+w, Cdate(&now), size-w); w += strlen(strbuf+w); @@ -30,6 +34,14 @@ Ptt_prints(char *str, size_t size, int mode) w += snprintf(&strbuf[w], size - w, "%d", SHM->UTMPnumber); break; + case 'l': + w += snprintf(&strbuf[w], size - w, + "%d", cuser.numlogins); + break; + case 'p': + w += snprintf(&strbuf[w], size - w, + "%d", cuser.numposts); + break; /* disabled for security issue. * we support only entries can be queried by others now. @@ -43,29 +55,8 @@ Ptt_prints(char *str, size_t size, int mode) w += snprintf(&strbuf[w], size - w, "%d", cuser.money); break; -#else - -#if 0 - case 'm': - w += snprintf(&strbuf[w], size - w, - "%s", money_level(cuser.money)); - break; -#endif - #endif - case 'l': - w += snprintf(&strbuf[w], size - w, - "%d", cuser.numlogins); - break; - case 'p': - w += snprintf(&strbuf[w], size - w, - "%d", cuser.numposts); - break; - case 'n': - strlcpy(strbuf+w, cuser.nickname, size-w); - w += strlen(strbuf+w); - break; /* It's saver not to send these undefined escape string. default: strbuf[w++] = ESC_CHR; diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 6efcc30a..1d619cf8 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -2465,6 +2465,10 @@ pmore_Preference() // TODO even better pref navigation, like arrow keys // static int lastkey = '\\'; // default key +#ifdef HAVE_SCREEN_GRAYOUT + grayout_lines(0, b_lines - 10, 0); +#endif // HAVE_SCREEN_GRAYOUT + while (1) { move(b_lines - 10, 0); diff --git a/mbbsd/talk.c b/mbbsd/talk.c index b666227a..720b38da 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1081,9 +1081,9 @@ t_display(void) } setuserfile(genbuf, fn_writelog); if (more(genbuf, YEA) != -1) { + grayout_lines(0, b_lines-4, 0); move(b_lines - 4, 0); clrtobot(); - outs(ANSI_COLOR(1;33;45) "★水球整理程式 " ANSI_RESET "\n" "提醒您: 可將水球存入信箱(M)後, 到【郵件選單】該信件前按 u,\n" "系統會將水球紀錄重新整理後寄送給您唷! " ANSI_RESET "\n"); diff --git a/mbbsd/user.c b/mbbsd/user.c index 35cc0aab..bb911fc6 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -498,6 +498,7 @@ void Customize(void) if(dirty) passwd_update(usernum, &cuser); + grayout_lines(0, b_lines, 0); vmsg("設定完成"); } |