2003/11/13 09:15:11
[org.ibex.core.git] / src / org / xwt / builtin / splash.xwt
index a99bb00..a6693b0 100644 (file)
         }
 
         xwt.thread = function() {
+xwt.log.println("1");
 //            $text.font = xwt.fonts.vera["Vera.ttf"];
-            $text.font = xwt.cache(xwt.uncab(xwt.load("http://master.dist.xwt.org/msfonts/arial32.exe"))["Arial.TTF"]);
+            var cab = xwt.res.uncab(xwt.res.url("http://master.dist.xwt.org/msfonts/arial32.exe"));
+//            $text.font = xwt.res.cache(cab["Arial.TTF"]);
+xwt.log.println("2");
+            $text.font = cab["Arial.TTF"];
+xwt.log.println("3");
             $text.fontsize = 18;
+xwt.log.println("4");
             $text.text = "downloading...";
+xwt.log.println("5");
             fill = xwt.org.xwt.builtin["splash.png"];
-            xwt.window = thisbox;
-            x = (xwt.screenWidth - width) / 2;
-            y = (xwt.screenHeight - height) / 2;
+xwt.log.println("6");
+            xwt.ui.window = thisbox;
+xwt.log.println("7");
+            thisbox.width = 100;
+            thisbox.height = 100;
+xwt.log.println("8");
+            x = (xwt.screen.width - width) / 2;
+            y = (xwt.screen.height - height) / 2;
             var origin = xwt.origin;
             if (origin.substring(0, 21) == "http://launch.xwt.org") {
                 origin = origin.substring(22);
                 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
             }
-            xwt.println("origin is " + origin);
-            var new_rr = xwt.unzip(xwt.watchProgress(xwt.load(origin), progress));
+            xwt.log.println("origin is " + origin);
+            var new_rr = xwt.res.unzip(xwt.watchProgress(xwt.load(origin), progress));
             var new_xwt = xwt.clone(new_rr);
 
             xwt.thread = function() {
-xwt.sleep(1000); // let the fonts get pulled in
+xwt.thread.sleep(1000); // let the fonts get pulled in
 for(var i=0; 100>i; i++) {
 progress(i, 100);
-xwt.yield();
+xwt.thread.yield();
 }
                 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
                 thisbox = null;