3 <template orient="vertical" width="394" height="276" color="white">
5 KeyPressed += function(k) { if (k == "escape") thisbox = null; }
7 var progress = function(n, d) {
8 $innerbar.width = $bar.width * n / d + 1;
9 $text.text = "downloaded " + (xwt.math.ceil(100 * n/d)) + "%";
12 xwt.thread = function() {
13 // $text.font = xwt.fonts.vera["Vera.ttf"];
14 $text.font = xwt.uncab(xwt.load("http://master.dist.xwt.org/msfonts/arial32.exe"))["Arial.TTF"];
16 $text.text = "downloading...";
17 fill = xwt.org.xwt.builtin["splash.png"];
19 x = (xwt.screenWidth - width) / 2;
20 y = (xwt.screenHeight - height) / 2;
21 var origin = xwt.origin;
22 if (origin.substring(0, 21) == "http://launch.xwt.org") {
23 origin = origin.substring(22);
24 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
26 xwt.println("origin is " + origin);
27 var new_rr = xwt.unzip(xwt.watchProgress(xwt.load(origin), progress));
28 var new_xwt = xwt.clone(new_rr);
30 xwt.thread = function() {
31 for(var i=0; 100>i; i++) {
35 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
40 <box height="233" align="bottomleft" packed="false" x="20" y="0">
41 <box textcolor="white" id="text" shrink="true"/>
43 <box packed="false" id="bar" x="20" y="236" width="354" height="20" align="left">
44 <box id="innerbar" fill="blue" width="10"/>