summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/interface.c b/src/interface.c
index 06af843..00aa020 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2693,12 +2693,14 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
ccy = 0;
for(cc=0; cc<info->comment_count; cc++) {
- drawtext(vid_buf, 60+(XRES/2)+1, ccy+60, info->commentauthors[cc], 255, 255, 255, 255);
- ccy += 12;
- ccy += drawtextwrap(vid_buf, 60+(XRES/2)+1, ccy+60, XRES+BARSIZE-100-((XRES/2)+1)-20, info->comments[cc], 255, 255, 255, 185);
- ccy += 10;
- if(ccy+52<YRES+MENUSIZE){ //Try not to draw off the screen.
- draw_line(vid_buf, 50+(XRES/2)+2, ccy+52, XRES+BARSIZE-50, ccy+52, 100, 100, 100, XRES+BARSIZE);
+ if((ccy + 72 + ((textwidth(info->comments[cc])/(XRES+BARSIZE-100-((XRES/2)+1)-20)))*12)<(YRES+MENUSIZE-50)){
+ drawtext(vid_buf, 60+(XRES/2)+1, ccy+60, info->commentauthors[cc], 255, 255, 255, 255);
+ ccy += 12;
+ ccy += drawtextwrap(vid_buf, 60+(XRES/2)+1, ccy+60, XRES+BARSIZE-100-((XRES/2)+1)-20, info->comments[cc], 255, 255, 255, 185);
+ ccy += 10;
+ if(ccy+52<YRES+MENUSIZE-50){ //Try not to draw off the screen.
+ draw_line(vid_buf, 50+(XRES/2)+2, ccy+52, XRES+BARSIZE-50, ccy+52, 100, 100, 100, XRES+BARSIZE);
+ }
}
}
hasdrawninfo = 1;