add magic to sol files and allow simple loading without texture and other things...
[neverball] / share / gui.c
index 6e93c39..0daeb62 100644 (file)
@@ -982,7 +982,7 @@ void gui_layout(int id, int xd, int yd)
 
     /* Hilite the widget under the cursor, if any. */
 
-    gui_point(id, -1, -1);
+    /* gui_point(id, -1, -1); */
 }
 
 int gui_search(int id, int x, int y)
@@ -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. */
 
@@ -1209,6 +1209,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();
     {