summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2011-12-10 23:01:01 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2011-12-10 23:01:01 +0800
commite6c286eedb93346cb63f921f8c9f6728cdd767c1 (patch)
treeb69f2ab6492ef1fc88a3a6ec5c870a50fe3d11ab
parent14bd6a3f572d329829a6b892e8dbbf3209a3c9a8 (diff)
downloadpttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.tar
pttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.tar.gz
pttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.tar.bz2
pttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.tar.lz
pttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.tar.xz
pttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.tar.zst
pttbbs-e6c286eedb93346cb63f921f8c9f6728cdd767c1.zip
gamble ui improvements: reduce colors, and remove more ansi escapes
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5501 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/cal.c4
-rw-r--r--pttbbs/mbbsd/gamble.c13
2 files changed, 7 insertions, 10 deletions
diff --git a/pttbbs/mbbsd/cal.c b/pttbbs/mbbsd/cal.c
index 6d831b3f..8cf8b302 100644
--- a/pttbbs/mbbsd/cal.c
+++ b/pttbbs/mbbsd/cal.c
@@ -78,8 +78,8 @@ lockutmpmode(int unmode, int state)
ModeTypeTable[currutmp->lockmode],
ModeTypeTable[unmode]);
else
- prints("抱歉! 您已有其他線相同的ID正在%s",
- ModeTypeTable[unmode]);
+ prints("抱歉! 因為您目前多重登入所以無法使用 %s",
+ ModeTypeTable[unmode]);
pressanykey();
return errorno;
}
diff --git a/pttbbs/mbbsd/gamble.c b/pttbbs/mbbsd/gamble.c
index c5f18d76..34df16e7 100644
--- a/pttbbs/mbbsd/gamble.c
+++ b/pttbbs/mbbsd/gamble.c
@@ -87,7 +87,7 @@ show_ticket_data(char betname[MAX_ITEM][MAX_ITEM_LEN],const char *direct, int *p
for (i = 0; i < count; i++) {
prints(ANSI_COLOR(0;1) "%d."
ANSI_COLOR(0;33)"%-*s: "
- ANSI_COLOR(36)"%-7d%s",
+ ANSI_COLOR(1;33)"%-7d%s",
i + 1, (wide ? IDLEN : 8), betname[i],
ticket[i], wide ? " " : "");
if (wide) {
@@ -99,7 +99,7 @@ show_ticket_data(char betname[MAX_ITEM][MAX_ITEM_LEN],const char *direct, int *p
}
}
prints(ANSI_RESET "\n已下注總額: "
- ANSI_COLOR(1;36) "%d" ANSI_RESET, total * (*price));
+ ANSI_COLOR(1;33) "%d" ANSI_RESET, total * (*price));
if (end) {
outs(",賭盤已經停止下注\n");
return -count;
@@ -367,10 +367,7 @@ openticket(int bid)
wide = 1;
}
for (i = 0; i < count; i++) {
- fprintf(fp,
- ANSI_COLOR(0;1) "%d."
- ANSI_COLOR(0;33)"%-*s: "
- ANSI_COLOR(36)"%-7d%s",
+ fprintf(fp, "%d.%-*s: %-7d%s",
i + 1, (wide ? IDLEN : 8), betname[i],
ticket[i], wide ? " " : "");
if (wide) {
@@ -381,7 +378,7 @@ openticket(int bid)
fputc('\n', fp);
}
}
- fprintf(fp, ANSI_RESET "\n");
+ fputc('\n', fp);
if (bet != 98) {
@@ -391,7 +388,7 @@ openticket(int bid)
"中獎比例: %d張/%d張 (%f)\n"
"每張中獎彩票可得 %d " MONEYNAME "\n\n",
Cdatelite(&now), betname[bet], total * price, ticket[bet], total,
- (float)ticket[bet] / total, money);
+ total ? (float)ticket[bet] / total : 0, money);
fprintf(fp, "%s 開出:%s 總額:%d 彩金/張:%d 機率:%1.2f\n\n",
Cdatelite(&now), betname[bet], total * price, money,