diff --git a/src/interface.c b/src/interface.c index f274dc547..bae9310e8 100644 --- a/src/interface.c +++ b/src/interface.c @@ -59,6 +59,8 @@ int search_date = 0; int search_page = 0; char search_expr[256] = ""; +char server_motd[256] = ""; + char *tag_names[TAG_MAX]; int tag_votes[TAG_MAX]; @@ -2423,12 +2425,16 @@ int search_ui(pixel *vid_buf) tp = -1; if (is_p1) - { - drawtext(vid_buf, (XRES-textwidth("Popular tags:"))/2, 31, "Popular tags:", 255, 192, 64, 255); + { + //Message of the day + //TODO: Some sort of rich text control that can be used for clickable links here (To saves or URLs for rules, etc) + drawtext(vid_buf, (XRES-textwidth(server_motd))/2, 33, server_motd, 255, 220, 150, 255); + //Popular tags + drawtext(vid_buf, (XRES-textwidth("Popular tags:"))/2, 49, "Popular tags:", 255, 192, 64, 255); for (gj=0; gj<((GRID_Y-GRID_P)*YRES)/(GRID_Y*14); gj++) - for (gi=0; giTAG_MAX || !tag_names[pos]) break; if (tag_votes[0]) @@ -2436,18 +2442,18 @@ int search_ui(pixel *vid_buf) else i = 192; w = textwidth(tag_names[pos]); - if (w>XRES/GRID_X-5) - w = XRES/GRID_X-5; - gx = (XRES/GRID_X)*gi; - gy = gj*14 + 46; - if (mx>=gx && mx=gy && myXRES/(GRID_X+1)-5) + w = XRES/(GRID_X+1)-5; + gx = (XRES/(GRID_X+1))*gi; + gy = gj*13 + 62; + if (mx>=gx && mx=gy && my= TAG_MAX)