aboutsummaryrefslogtreecommitdiff
path: root/trade.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-04-19 17:32:49 -0400
committerNathan Vance <nathav63@gmail.com>2015-04-19 17:32:49 -0400
commit0fde3a0bac550e4739757f1f60d0eb566b4007a1 (patch)
treed85e896228ee294a93a726fda448abbd98e7923e /trade.c
parentFixed bug with spending more gold than in treasury (diff)
download7w-0fde3a0bac550e4739757f1f60d0eb566b4007a1.tar.gz
7w-0fde3a0bac550e4739757f1f60d0eb566b4007a1.tar.bz2
7w-0fde3a0bac550e4739757f1f60d0eb566b4007a1.zip
UI bug fixes
Diffstat (limited to 'trade.c')
-rw-r--r--trade.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/trade.c b/trade.c
index d916395..94ecdb5 100644
--- a/trade.c
+++ b/trade.c
@@ -110,10 +110,15 @@ void trade_print(int x, int y, int player, int cursorx, int cursory)
for(i = 0; i < GOLD+1; i++) {
sprintf(s, "%-7s%2d %c| %-7s %d %c", getname(i), west[i], (cursorx == 1 && cursory == i)? '*' : ' ', getname(i), east[i], (cursorx == 0 && cursory == i)? '*' : ' ');
y = io_printtext(x, y, width, s);
- if(tradebuffer[1][i])
- io_printcolor(x+10, y-1, 31, itoa(west[i]));
- if(tradebuffer[0][i])
+ if(tradebuffer[1][i]) {
+ if(west[i] < 10)
+ io_printcolor(x+10, y-1, 31, itoa(west[i]));
+ else
+ io_printcolor(x+9, y-1, 31, itoa(west[i]));
+ }
+ if(tradebuffer[0][i]) {
io_printcolor(x+23, y-1, 31, itoa(east[i]));
+ }
}
sprintf(s, "Your gold: %d", data_getgold(player));
y = io_printtext(x, y, width, s);
bgstack15