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)) + "%";
13 xwt.thread = function() {
14 $text.font = xwt.fonts.vera["Vera.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() {
32 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
37 <box height="236" align="bottomleft" packed="false" x="20" y="0">
38 <box textcolor="white" id="text" shrink="true" fill="green"/>
40 <box packed="false" id="bar" x="20" y="236" width="354" height="20" align="left">
41 <box id="innerbar" fill="blue" width="10"/>