2003/10/25 07:50:20
[org.ibex.core.git] / src / org / xwt / builtin / splash.xwt
index 32ceb4c..9d6ef80 100644 (file)
@@ -5,14 +5,12 @@
         KeyPressed += function(k) { if (k == "escape") thisbox = null; }
 
         var progress = function(n, d) {
-            xwt.println("loaded " + 100 * (n/d) + "%");
             $innerbar.width = $bar.width * n / d;
+            xwt.yield();
         }
 
         xwt.thread = function() {
             var img = xwt.org.xwt.builtin["splash.png"];
-            xwt.println("img is");
-            xwt.println(img);
             fill = img;
             xwt.yield();
             x = (xwt.screenWidth - width) / 2;
                 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
             }
             xwt.println("origin is " + origin);
-            var new_rr = xwt.watchProgress(xwt.load(origin), progress);
+            var new_rr = xwt.unzip(xwt.watchProgress(xwt.load(origin), progress));
             var new_xwt = xwt.clone(new_rr);
+            new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
         }
 
-        <box packed="false" id="bar" x="20" y="236" width="354" height="19" align="left">
-            <box id="innerbar" fill="blue" width="0"/>
+        <box packed="false" id="bar" x="20" y="236" width="354" height="18" align="left">
+            <box id="innerbar" fill="blue" width="10"/>
         </box>
 
     </template>