updated tests
[org.ibex.core.git] / tests / test2.t
index 3dcc5e3..ce02efb 100644 (file)
@@ -1,23 +1,20 @@
 <ibex xmlns:ui="ibex://ui">
     <ui:box width="300" height="300" packed="false">
         ibex.ui.frame = thisbox;
-
+<!--
         <ui:box fill="red" width="50" height="50" id="red" x="100" y="100" packed="false"/>
+-->
 
         // this thread makes things spin.
         var rot = 0;
         ibex.thread = function(f) { while(true) {
-             ibex.thread.yield();
-//             if (ibex.math.floor(rot / 90) == rot / 90)
-//               $top.transform = "rotate(" + rot + ")";
-//             $bot.transform = "rotate(" + (-2 * rot) + ")";
-             $red.fill = "red";
-             ibex.thread.yield();
-             $red.fill = "green";
-             ibex.thread.yield();
-             rot += 1;
+             ibex.thread.sleep(100);
+             if (ibex.math.floor(rot / 90) == rot / 90)
+               $top.transform = "rotate(" + rot + ")";
+             $bot.transform = "rotate(" + (-2 * rot) + ")";
+             rot += 5;
        } }
-<!--
+<ui:box fill="green" shrink="true" packed="false" align="center" x="150" y="150">
         <ui:box fill="orange" colspan="2" minwidth="200" minheight="100" id="top" x="200" y="200"> 
             <ui:box fill="green" width="100" height="18">
                 <ui:box stroke="black" strokecolor="black" height="18" width="100" text="booya"/>
@@ -38,6 +35,6 @@
             </ui:box>
         </ui:box>
         <ui:box fill="yellow" colspan="2"/>
--->
+</ui:box>
     </ui:box>
 </ibex>