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() {
15 x = (xwt.screenWidth - width) / 2;
16 y = (xwt.screenHeight - height) / 2;
17 var origin = xwt.origin;
18 if (origin.substring(0, 21) == "http://launch.xwt.org") {
19 origin = origin.substring(22);
20 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
22 xwt.println("origin is " + origin);
23 var new_rr = xwt.unzip(xwt.watchProgress(xwt.load(origin), progress));
24 var new_xwt = xwt.clone(new_rr);
25 $text.font = xwt.fonts.vera["Vera.ttf"];
26 $text.textcolor = "#f11ff1";
28 $text.text = "downloading...";
29 Press1 += function() { xwt.thread = function() {
30 var img = xwt.org.xwt.builtin["splash.png"];
33 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
38 <box height="236" align="bottomleft" packed="false" x="20" y="0">
39 <box fontcolor="white" id="text" shrink="true"/>
41 <box packed="false" id="bar" x="20" y="236" width="354" height="20" align="left">
42 <box id="innerbar" fill="blue" width="10"/>