2002/04/30 21:10:57
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:46:32 +0000 (06:46 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:46:32 +0000 (06:46 +0000)
darcs-hash:20040130064632-2ba56-769bbac79ab3b292098fa275f5044fc7e7191854.gz

CHANGES
src/org/xwt/Main.java

diff --git a/CHANGES b/CHANGES
index 1c6d9dd..fe04aed 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 29-Apr megacz src/org/xwt/themes/monopoly: overhauled the menu and
               tree widgets.
               
+29-Apr megacz Main.java: fixed splashscreen refresh bug.
+              
+
+              
 
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);
         }