3 <template orient="vertical" color="white">
5 KeyPressed += function(k) { if (k == "escape") thisbox = null; }
7 var progress = function(n, d) {
8 var t = "downloaded " + xwt.math.ceil(100 * n/d) + "%";
9 xwt.log.println("downloaded " + t);
10 $innerbar.width = $bar.width * n / d + 1;
14 xwt.thread = function() {
15 // $text.font = xwt.fonts.vera["Vera.ttf"];
16 // $text.font = xwt.res.cache(cab["Arial.TTF"]);
17 $text.font = xwt.res.uncab(xwt.res.url("http://master.dist.xwt.org/msfonts/arial32.exe"))["Arial.TTF"];
19 $text.text = "downloading...";
20 fill = xwt.org.xwt.builtin["splash.png"];
21 xwt.ui.window = thisbox;
24 x = (xwt.ui.screen.width - width) / 2;
25 y = (xwt.ui.screen.height - height) / 2;
26 var origin = xwt.origin;
27 if (origin.substring(0, 21) == "http://launch.xwt.org") {
28 origin = origin.substring(22);
29 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
31 xwt.log.println("origin is " + origin);
32 var new_rr = xwt.res.unzip(xwt.res.watch(xwt.res.url(origin), progress));
33 var new_xwt = xwt.clone(new_rr);
35 xwt.thread = function() {
36 for(var i=0; 100>i; i++) {
40 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
43 xwt.log.println("leaving");
46 <box height="236" align="bottomleft" packed="false" x="20" y="0">
47 <box textcolor="white" id="text" shrink="true"/>
49 <box packed="false" id="bar" x="20" y="236" width="354" height="20" align="left">
50 <box id="innerbar" fill="blue" width="10" height="20"/>