main_gui.c
changeset 1688 787400219027
parent 1657 eb57fee328fb
child 1697 be3b6806cbb4
--- a/main_gui.c	Wed Apr 13 18:36:29 2005 +0000
+++ b/main_gui.c	Wed Apr 13 23:03:31 2005 +0000
@@ -2238,6 +2238,9 @@
 				DrawStringCentered(320, 1,	STR_02BA, 0);
 			}
 		}
+
+		if (WP(w, def_d).data_2 > 0)
+			DrawSprite(SPR_BLOT | PALETTE_TO_RED, 489, 2);
 		break;
 
 	case WE_CLICK:
@@ -2251,10 +2254,20 @@
 		break;
 
 	case WE_TICK: {
-		if (_pause || WP(w,def_d).data_1 <= -1280)
-			return;
-		WP(w,def_d).data_1 -= 2;
-		InvalidateWidget(w, 1);
+		if (_pause) return;
+
+		if (WP(w, def_d).data_1 > -1280) { /* Scrolling text */
+			WP(w, def_d).data_1 -= 2;
+			InvalidateWidget(w, 1);
+		}
+
+		if (WP(w, def_d).data_2 > 0) { /* Red blot to show there are new unread newsmessages */
+			WP(w, def_d).data_2 -= 2;
+		} else if (WP(w, def_d).data_2 < 0) {
+			WP(w, def_d).data_2 = 0;
+			InvalidateWidget(w, 1);
+		}
+
 		break;
 	}
 	}