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() {
14 // $text.font = xwt.fonts.vera["Vera.ttf"];
15 var cab = xwt.res.uncab(xwt.res.url("http://master.dist.xwt.org/msfonts/arial32.exe"));
16 // $text.font = xwt.res.cache(cab["Arial.TTF"]);
18 $text.font = cab["Arial.TTF"];
22 $text.text = "downloading...";
24 fill = xwt.org.xwt.builtin["splash.png"];
26 xwt.ui.window = thisbox;
31 x = (xwt.screen.width - width) / 2;
32 y = (xwt.screen.height - height) / 2;
33 var origin = xwt.origin;
34 if (origin.substring(0, 21) == "http://launch.xwt.org") {
35 origin = origin.substring(22);
36 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
38 xwt.log.println("origin is " + origin);
39 var new_rr = xwt.res.unzip(xwt.watchProgress(xwt.load(origin), progress));
40 var new_xwt = xwt.clone(new_rr);
42 xwt.thread = function() {
43 xwt.thread.sleep(1000); // let the fonts get pulled in
44 for(var i=0; 100>i; i++) {
48 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
53 <box height="233" align="bottomleft" packed="false" x="20" y="0">
54 <box textcolor="white" id="text" shrink="true"/>
56 <box packed="false" id="bar" x="20" y="236" width="354" height="20" align="left">
57 <box id="innerbar" fill="blue" width="10"/>