diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 00:48:34 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 00:48:34 +0800 |
commit | 050df9b137cf1be6876e551a5a98c1038be73b50 (patch) | |
tree | 104fef52b1ca6b95ae3be806f02540d056cd93f0 /mbbsd/menu.c | |
parent | 30b08ca27e39588cde705a96381a9643d534351e (diff) | |
download | pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.gz pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.bz2 pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.lz pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.xz pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.zst pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.zip |
- visio: add vbar and varf, better l-r API.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4148 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/menu.c')
-rw-r--r-- | mbbsd/menu.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 0b335353..0434d6f9 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -136,27 +136,21 @@ show_status(void) { int i; struct tm *ptime = localtime4(&now); - char mystatus[160]; char *myweek = "天一二三四五六"; const char *msgs[] = {"關閉", "打開", "拔掉", "防水", "好友"}; i = ptime->tm_wday << 1; - snprintf(mystatus, sizeof(mystatus), - ANSI_COLOR(34;46) "[%d/%d 星期%c%c %d:%02d]" - ANSI_COLOR(1;33;45) "%-14s" - ANSI_COLOR(30;47) " 線上" ANSI_COLOR(31) - "%d" ANSI_COLOR(30) "人, 我是" ANSI_COLOR(31) "%s" - ANSI_COLOR(30) , - ptime->tm_mon + 1, ptime->tm_mday, myweek[i], myweek[i + 1], - ptime->tm_hour, ptime->tm_min, currutmp->birth ? - "生日要請客唷" : SHM->today_is, - SHM->UTMPnumber, cuser.userid); - outmsg(mystatus); - i = strlen(mystatus) - (3*7+25); // 3 = ANSI_COLOR, 25 = stuff inside - sprintf(mystatus, "[扣機]" ANSI_COLOR(31) "%s ", - msgs[currutmp->pager]); - outslr("", i, mystatus, strlen(msgs[currutmp->pager]) + 7); - outs(ANSI_RESET); + move(b_lines, 0); + vbarf(ANSI_COLOR(34;46) "[%d/%d 星期%c%c %d:%02d]" + ANSI_COLOR(1;33;45) "%-14s" + ANSI_COLOR(30;47) " 線上" ANSI_COLOR(31) + "%d" ANSI_COLOR(30) "人, 我是" ANSI_COLOR(31) "%s" + ANSI_COLOR(30) "\t[扣機]" ANSI_COLOR(31) "%s ", + ptime->tm_mon + 1, ptime->tm_mday, myweek[i], myweek[i + 1], + ptime->tm_hour, ptime->tm_min, currutmp->birth ? + "生日要請客唷" : SHM->today_is, + SHM->UTMPnumber, cuser.userid, + msgs[currutmp->pager]); } /* |