3 <template orient="vertical" color="white">
5 KeyPressed += function(k) { if (k == "escape") thisbox = null; }
7 var settext = function(t) {
15 var progress = function(n, d) {
16 var t = "downloaded " + xwt.math.ceil(100 * n/d) + "%";
17 xwt.log.println("downloaded " + t);
18 $innerbar.width = $bar.width * n / d + 1;
22 xwt.thread = function() {
23 $text.font = xwt.font.sansserif;
25 $text1.font = xwt.font.sansserif;
27 $text2.font = xwt.font.sansserif;
29 $text3.font = xwt.font.sansserif;
31 $text4.font = xwt.font.sansserif;
33 settext("downloading...");
34 fill = .org.xwt.builtin["splash.png"];
35 xwt.ui.window = thisbox;
38 x = (xwt.ui.screen.width - width) / 2;
39 y = (xwt.ui.screen.height - height) / 2;
40 var origin = xwt.origin;
41 if (origin.substring(0, 21) == "http://launch.xwt.org") {
42 origin = origin.substring(22);
43 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
45 xwt.log.println("origin is " + origin);
46 var new_rr = xwt.res.unzip(xwt.res.watch(xwt.res.url(origin), progress));
47 var new_xwt = xwt.clone(new_rr);
49 xwt.thread = function() {
50 for(var i=0; 100>i; i++) {
54 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
57 xwt.log.println("leaving");
60 <box height="236" align="bottomleft" packed="false" x="20" y="0">
62 <box packed="false" textcolor="black" x="2" y="2" id="text1"/>
63 <box packed="false" textcolor="black" x="0" y="2" id="text2"/>
64 <box packed="false" textcolor="black" x="2" y="0" id="text3"/>
65 <box packed="false" textcolor="black" x="0" y="0" id="text4"/>
67 <box height="1" colspan="2"/>
69 <box textcolor="white" id="text"/>
73 <box packed="false" id="bar" x="20" y="236" width="354" height="20" align="left">
74 <box id="innerbar" fill="blue" width="10" height="20"/>