2002/04/30 21:10:57
[org.ibex.core.git] / src / org / xwt / Main.java
index 1f8e12f..1f7903c 100644 (file)
@@ -198,15 +198,22 @@ public class Main extends Applet {
                                            barX, barY - 5, 0xffffffff);
             } else {
                 barPos = barW / 2 + (instantiatedUnits * barW) / (initialTemplate.numUnits() * 2);
-                surf.backbuffer.drawString(Platform.getDefaultFont(), "loading user interface: " +
+                surf.backbuffer.drawString(Platform.getDefaultFont(), "initializing user interface: " +
                                            ((instantiatedUnits * 100) / (initialTemplate.numUnits())) + 
                                            "% complete", barX, barY - 5, 0xffffffff);
             }
             if (barPos > barW) barPos = barW;
 
+            // for some reason, the clip keeps getting set on Java2 under Windows -- so we unset it
+            surf.backbuffer.setClip(0, 0, surf.backbuffer.getWidth(), surf.backbuffer.getHeight());
+
             surf.backbuffer.fillRect(barX, barY, barPos + barX, barH + barY, 0xFF363a86);
             surf.backbuffer.fillRect(barX + 1, barY + 1, barPos - 1 + barX + 1, barH - 1 + barY + 1, 0xFF000036);
             surf.backbuffer.fillRect(barX + 1, barY + 1, barPos - 2 + barX + 1, barH - 2 + barY + 1, 0xFF101350);
+
+            // This is really ugly, but unfortunately it's the only way -- the MessageQueue is all clogged up with the
+            // initial instantiation. This takes care of blitting regions dirtied on the screen.
+            surf.blitDirtyScreenRegions();
             surf.blit(surf.backbuffer, barX, barY - 20, barX, barY - 20, barW + barX, barH + barY);
         }