From: megacz Date: Fri, 30 Jan 2004 06:46:32 +0000 (+0000) Subject: 2002/04/30 21:10:57 X-Git-Tag: RC3~1791 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=7f0a50f5002ee3274c9698b4e7405b3b0274da5b 2002/04/30 21:10:57 darcs-hash:20040130064632-2ba56-769bbac79ab3b292098fa275f5044fc7e7191854.gz --- diff --git a/CHANGES b/CHANGES index 1c6d9dd..fe04aed 100644 --- a/CHANGES +++ b/CHANGES @@ -100,4 +100,8 @@ 29-Apr megacz src/org/xwt/themes/monopoly: overhauled the menu and tree widgets. +29-Apr megacz Main.java: fixed splashscreen refresh bug. + + + diff --git a/src/org/xwt/Main.java b/src/org/xwt/Main.java index 1f8e12f..1f7903c 100644 --- a/src/org/xwt/Main.java +++ b/src/org/xwt/Main.java @@ -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); }