Change SOL "magic number" to 0x4c4f53af. See rationale in the log of
[neverball] / share / gui.c
index 0815293..ce284bd 100644 (file)
@@ -1168,7 +1168,7 @@ static void gui_paint_count(int id)
                  widget[id].scale,
                  widget[id].scale);
 
-        if (widget[id].value)
+        if (widget[id].value > 0)
         {
             /* Translate left by half the total width of the rendered value. */
 
@@ -1186,7 +1186,7 @@ static void gui_paint_count(int id)
                 glTranslatef((GLfloat) -digit_w[i][j % 10], 0.0f, 0.0f);
             }
         }
-        else
+        else if (widget[id].value == 0)
         {
             /* If the value is zero, just display a zero in place. */
 
@@ -1210,6 +1210,9 @@ static void gui_paint_clock(int id)
     GLfloat dx_large = (GLfloat) digit_w[i][0];
     GLfloat dx_small = (GLfloat) digit_w[i][0] * 0.75f;
 
+    if (widget[id].value < 0)
+        return;
+
     glPushMatrix();
     {
         glColor4fv(gui_wht);
@@ -1430,6 +1433,11 @@ int gui_point(int id, int x, int y)
         return active = jd;
 }
 
+void gui_focus(int i)
+{
+    active = i;
+}
+
 int gui_click(void)
 {
     return active;