Changeset 64
- Timestamp:
- 06/21/08 21:07:37 (4 months ago)
- Files:
-
- trunk/pihlaja/src/pihlaja/PihlajaMain.d (modified) (1 diff)
- trunk/pihlaja/src/shiraz/Shiraz.d (modified) (2 diffs)
- trunk/pihlaja/src/shiraz/canvas/ICanvasItem.d (modified) (1 diff)
- trunk/pihlaja/src/shiraz/canvas/PlainRectangle.d (modified) (3 diffs)
- trunk/pihlaja/src/shiraz/canvas/Rectangle.d (modified) (13 diffs)
- trunk/pihlaja/src/shiraz/canvas/rtree/RTree.d (modified) (2 diffs)
- trunk/pihlaja/src/shiraz/ui/Animator.d (modified) (8 diffs)
- trunk/pihlaja/src/shiraz/ui/SubWindow.d (modified) (13 diffs)
- trunk/pihlaja/src/shiraz/ui/Window.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pihlaja/src/pihlaja/PihlajaMain.d
r63 r64 1082 1082 //be on the screen at the same time. Possibly both. 1083 1083 1084 /* 1084 1085 for(uint i = 0; i < 10; i++) 1085 1086 { 1086 1087 crazyTest(); 1087 1088 } 1089 */ 1088 1090 1089 1091 Widget checkerBoard = new Widget(); trunk/pihlaja/src/shiraz/Shiraz.d
r63 r64 289 289 break; 290 290 case "Shiraz.Button": 291 Trace.formatln("Creating Button texture."); 291 292 texture = new Image( Image.GRADIENT_2 ); 292 293 texture.name = "Shiraz.Button"; … … 329 330 { 330 331 if( img.name == set_name ) 332 { 333 Trace.formatln("Reusing texture called {}.", set_name ); 331 334 return img; 335 } 332 336 } 333 337 return null; trunk/pihlaja/src/shiraz/canvas/ICanvasItem.d
r48 r64 301 301 void remove( Animator set_anim ); 302 302 303 void hide(); 304 void show(); 305 bool isHidden(); 306 303 307 //LinkSeq!(ICanvasItem) enclosureList( double tx, double ty, double tw, double th, inout LinkSeq!(ICanvasItem) hit_items = null ); 304 308 } trunk/pihlaja/src/shiraz/canvas/PlainRectangle.d
r62 r64 1095 1095 { 1096 1096 debug(clipping) Trace.formatln("PlainRectangle.render() START. name: {}", fullName() ); 1097 1098 if( isHidden == true ) 1099 return; 1097 1100 1098 1101 beginRender(draw); … … 1605 1608 float a( float set ) { return _colour_data[3] = set; } 1606 1609 1610 /* 1611 float r( float set ) { _colour_data[0] = set; invalidate(); return _colour_data[0]; } 1612 float g( float set ) { _colour_data[1] = set; invalidate(); return _colour_data[1]; } 1613 float b( float set ) { _colour_data[2] = set; invalidate(); return _colour_data[2]; } 1614 float a( float set ) { _colour_data[3] = set; invalidate(); return _colour_data[3]; } 1615 */ 1616 1607 1617 void colour( float sr, float sg, float sb, float sa ) 1608 1618 { … … 1982 1992 }*/ 1983 1993 1984 1994 //API: 1995 public void hide() { isHidden = true; } 1996 public void show() { isHidden = false; } 1997 //Internal: 1998 public bool isHidden() { return m_isHidden; } 1999 protected bool isHidden(bool set) { return m_isHidden = set; } 2000 protected bool m_isHidden = false; 1985 2001 1986 2002 trunk/pihlaja/src/shiraz/canvas/Rectangle.d
r63 r64 1880 1880 //Trace.formatln("Animations pending."); 1881 1881 invalidate(); 1882 } 1883 1882 1883 1884 //Trace.formatln("Trying to get head()."); 1885 Animator anim = animator.head(); 1886 1887 //Trace.formatln("Got anim head."); 1888 if( anim !is null && anim.animate() == false ) 1889 { 1890 //Trace.formatln("removing anim."); 1891 anim.removeFromOwner(); 1892 } 1893 1894 } 1895 1896 //Trace.formatln("ok anims."); 1897 1898 1899 //This is the version where we have multiple animations 1900 //running simultaneously. 1901 //For the time being we'll use the version where 1902 //only one animation can run at a time. Because it 1903 //is simpler. 1904 1905 /* 1884 1906 LinkSeq!(Animator) to_remove = new LinkSeq!(Animator); 1885 1907 … … 1894 1916 anim.removeFromOwner(); 1895 1917 } 1896 1918 */ 1897 1919 foreach(Rectangle wid; itemList) 1898 1920 { … … 1906 1928 { 1907 1929 //Trace.formatln("Added animation."); 1908 animator.append( set_anim ); 1909 invalidate();//redraw when a new animation is added 1910 //to get it started and runnign. 1930 1931 //Temporary limit of 5 animations: 1932 if( animator.length < 5 ) 1933 { 1934 animator.append( set_anim ); 1935 invalidate();//redraw when a new animation is added 1936 //to get it started and running. 1937 } 1911 1938 } 1912 1939 … … 2067 2094 } 2068 2095 2096 //Colour Memory. Prelight colour uses this to store the actual colour. 2097 float rMem() { return _colour_mem_data[0]; } 2098 float gMem() { return _colour_mem_data[1]; } 2099 float bMem() { return _colour_mem_data[2]; } 2100 float aMem() { return _colour_mem_data[3]; } 2101 2102 float rMem( float set ) { return _colour_mem_data[0] = set; } 2103 float gMem( float set ) { return _colour_mem_data[1] = set; } 2104 float bMem( float set ) { return _colour_mem_data[2] = set; } 2105 float aMem( float set ) { return _colour_mem_data[3] = set; } 2106 2107 void colourMem( float sr, float sg, float sb, float sa ) 2108 { 2109 rMem = sr; gMem = sg; bMem = sb; aMem = sa; 2110 } 2111 2112 void colourMem( float[] set ) 2113 { 2114 if( set.length >= 4 ) 2115 { 2116 rMem = set[0]; gMem = set[1]; bMem = set[2]; aMem = set[3]; 2117 } 2118 } 2119 2120 protected float[4] _colour_mem_data; 2121 2069 2122 /** 2070 2123 If prelight is true, the widget will be drawn … … 2075 2128 { 2076 2129 m_isPrelight = true; 2130 2131 colourMem( r, g, b, a ); 2132 2133 if( r > 0.8f )//If whitish...make darker. 2134 { 2135 colourAnim( 0.7f*r, 0.7f*g, 0.7f*b, a ); 2136 } 2137 else //otherwise make lighter. 2138 { 2139 colourAnim( 1.3f*r, 1.3f*g, 1.3f*b, a ); 2140 } 2141 2077 2142 invalidate(); 2078 2143 return m_isPrelight; … … 2081 2146 { 2082 2147 m_isPrelight = false; 2148 2149 colourAnim( rMem, gMem, bMem, aMem ); 2150 2083 2151 invalidate(); 2084 2152 return m_isPrelight; … … 2668 2736 Trace.formatln("Trying to remove stuff."); 2669 2737 2738 if( a_widget.parent !is this ) 2739 { 2740 Trace.formatln("The Rectangle that we tried to remove isn't in this Container."); 2741 return; 2742 } 2743 2744 Trace.formatln("Removing from itemList."); 2745 itemList.remove( a_widget ); 2746 Trace.formatln("Removing from RTree."); 2747 itemTree.remove( a_widget ); 2748 2749 Trace.formatln("Removing done. Cleaning up."); 2750 2670 2751 a_widget.parent = null; 2671 2752 a_widget.rootWindow = null; 2672 2673 itemList.remove( a_widget ); 2674 itemTree.remove( a_widget ); 2753 2754 Trace.formatln("Removing - arrange."); 2675 2755 arrange(); 2676 2756 2757 Trace.formatln("Removing - invalidate."); 2677 2758 invalidate(); 2678 2759 } … … 2699 2780 protected Anchor m_anchor = Anchor.TOP_LEFT; 2700 2781 2782 /* 2701 2783 //This is the public API of hiding and showing. 2702 2784 //NOT TRUE AT THE MOMENT: … … 2712 2794 protected bool isHidden(bool set) { return m_isHidden = set; } 2713 2795 protected bool m_isHidden = false; 2796 */ 2714 2797 2715 2798 public void packOptions( PackOptions set_x, PackOptions set_y ) … … 3529 3612 protected void applyColour() 3530 3613 { 3614 /* 3531 3615 if( m_isPrelight == false ) 3532 3616 { 3617 */ 3533 3618 glColor4f( r, g, b, a ); 3619 /* 3534 3620 } 3535 3621 else if( r > 0.8f )//If whitish...make darker. … … 3541 3627 glColor4f( 1.3f*r, 1.3f*g, 1.3f*b, a ); 3542 3628 } 3629 */ 3543 3630 } 3544 3631 … … 3718 3805 protected float m_maxHeight = 0.0f; 3719 3806 3807 //Colour animations: 3808 3809 void rAnim( float to_set, void delegate() set_when_finished = null ) 3810 { 3811 Animator to_anim = new Animator(this, &r, &r, null, null, null, null, set_when_finished ); 3812 to_anim.animateTo( to_set, 0.0f, 0.0f ); 3813 } 3814 3815 void gAnim( float to_set, void delegate() set_when_finished = null ) 3816 { 3817 Animator to_anim = new Animator(this, &g, &g, null, null, null, null, set_when_finished ); 3818 to_anim.animateTo( to_set, 0.0f, 0.0f ); 3819 } 3820 3821 void bAnim( float to_set, void delegate() set_when_finished = null ) 3822 { 3823 Animator to_anim = new Animator(this, &b, &b, null, null, null, null, set_when_finished ); 3824 to_anim.animateTo( to_set, 0.0f, 0.0f ); 3825 } 3826 3827 void aAnim( float to_set, void delegate() set_when_finished = null ) 3828 { 3829 Animator to_anim = new Animator(this, &a, &a, null, null, null, null, set_when_finished ); 3830 to_anim.animateTo( to_set, 0.0f, 0.0f ); 3831 } 3832 3833 void colourAnim( float to_r, float to_g, float to_b, float to_a = 1.0f, void delegate() set_when_finished = null ) 3834 { 3835 Animator to_anim = new Animator(this, &r, &r, &g, &g, &b, &b, set_when_finished ); 3836 to_anim.animateTo( to_r, to_g, to_b ); 3837 3838 Animator to_anim_alpha = new Animator(this, &a, &a, null, null, null, null, set_when_finished ); 3839 to_anim_alpha.animateTo( to_a, 0.0f, 0.0f ); 3840 } 3720 3841 3721 3842 //Redefined for adjustTree: … … 3747 3868 } 3748 3869 3870 void moveToAnim( float to_x, float to_y, float to_z = 0.0f, void delegate() set_when_finished = null ) 3871 { 3872 Animator to_anim = new Animator(this, &xPos, &xPos, &yPos, &yPos, &zPos, &zPos, set_when_finished ); 3873 to_anim.animateTo( to_x, to_y, to_z ); 3874 } 3875 3876 void sizeAnim( float to_w, float to_h, void delegate() set_when_finished = null ) 3877 { 3878 Animator to_anim = new Animator(this, &w, &w, &h, &h, null, null, set_when_finished ); 3879 to_anim.animateTo( to_w, to_h, 0.0f ); 3880 } 3881 3749 3882 public float x1(){ return super.x1; } 3750 3883 public float x1( float set ) trunk/pihlaja/src/shiraz/canvas/rtree/RTree.d
r63 r64 2794 2794 { 2795 2795 debug(RTree) Trace.formatln("inner foreach."); 2796 if(it !is null )2796 if(it !is null && it.isHidden == false ) 2797 2797 { 2798 2798 debug(RTree) Trace.formatln("testing for enclosure then."); … … 3456 3456 Trace.formatln("Tried to remove: {}\n\n", edit1.toString() ); 3457 3457 3458 uint num_of_elements = 10; 3459 3460 Trace.formatln( "\n\n\nAdding {} elements.\n\n\n", num_of_elements ); 3461 3462 LinkSeq!(Rectangle) rects = new LinkSeq!(Rectangle); 3463 for( uint i = 0; i < num_of_elements; i++ ) 3464 { 3465 Trace.formatln( "Adding element {}.", i ); 3458 for( uint d = 0; d < 1; d++ ) 3459 { 3460 3461 uint num_of_elements = 2; 3466 3462 3467 Rectangle re = new Rectangle(); 3468 re.setXYXY( i*10.0f, 0.0f, (i*10.0) + 10.0f, 18.0f ); 3469 rects.append(re); 3470 itemTree.append(re); 3471 } 3463 Trace.formatln( "\n\n\nAdding {} elements.\n\n\n", num_of_elements ); 3472 3464 3473 Trace.formatln( "Moving and adjusting tree for {} elements.", num_of_elements ); 3474 foreach( Rectangle r; rects ) 3475 { 3476 r.xPos = r.xPos + 8.0f; 3477 r.yPos = r.yPos + 5.0f; 3478 r.adjustTree(); 3479 } 3480 3481 Trace.formatln( "Removing every other of {} elements.", num_of_elements ); 3482 for( uint i = 0; i < num_of_elements; ) 3483 { 3484 Trace.formatln( "Trying to remove element {}.", i ); 3485 itemTree.remove( rects[i] ); 3486 i = i + 2; 3487 } 3488 3465 LinkSeq!(Rectangle) rects = new LinkSeq!(Rectangle); 3466 for( uint i = 0; i < num_of_elements; i++ ) 3467 { 3468 Trace.formatln( "Adding element {}.", i ); 3469 3470 Rectangle re = new Rectangle(); 3471 re.setXYXY( i*10.0f, 0.0f, (i*10.0) + 10.0f, 18.0f ); 3472 rects.append(re); 3473 itemTree.append(re); 3474 } 3475 3476 Trace.formatln( "Moving and adjusting tree for {} elements.", num_of_elements ); 3477 foreach( Rectangle r; rects ) 3478 { 3479 r.xPos = r.xPos + 8.0f; 3480 r.yPos = r.yPos + 5.0f; 3481 r.adjustTree(); 3482 } 3483 3484 Trace.formatln( "Removing every other of {} elements.", num_of_elements ); 3485 for( uint i = 0; i < num_of_elements; ) 3486 { 3487 Trace.formatln( "Trying to remove element {}.", i ); 3488 itemTree.remove( rects[i] ); 3489 i = i + 2; 3490 } 3491 } 3489 3492 3490 3493 Trace.formatln( "\nTesting enclosureList()." ); trunk/pihlaja/src/shiraz/ui/Animator.d
r63 r64 51 51 float delegate(float) setZ; 52 52 53 void delegate() whenFinished; 54 53 55 float toX; 54 56 float toY; … … 74 76 //this( float delegate() set_get, float delegate(float) set_set ) 75 77 76 this( ICanvasItem set_item, float delegate(float) set_x, float delegate(float) set_y, float delegate(float) set_z )78 this( ICanvasItem set_item, float delegate(float) set_x, float delegate(float) set_y, float delegate(float) set_z, void delegate() set_when_finished = null ) 77 79 { 78 80 animatorType = AnimatorType.ABSOLUTE_PATH; … … 87 89 setY = set_y; 88 90 setZ = set_z; 89 } 90 91 this( ICanvasItem set_item, float delegate(float) set_x, float delegate() get_x, float delegate(float) set_y, float delegate() get_y, float delegate(float) set_z, float delegate() get_z ) 91 92 whenFinished = set_when_finished; 93 } 94 95 this( ICanvasItem set_item, float delegate(float) set_x, float delegate() get_x, float delegate(float) set_y, float delegate() get_y, float delegate(float) set_z, float delegate() get_z, void delegate() set_when_finished = null ) 92 96 { 93 97 animatorType = AnimatorType.ABSOLUTE_TO; … … 107 111 setZ = set_z; 108 112 getZ = get_z; 113 114 whenFinished = set_when_finished; 109 115 110 116 if( setX is null || getX is null ) … … 247 253 if( position >= 1.0 ) 248 254 { 255 if( whenFinished !is null ) 256 whenFinished(); 257 249 258 if( owner !is null ) 250 259 { … … 265 274 { 266 275 float now_x = toX - getX(); 267 Trace.formatln("now_x: {}", cast(double)now_x); 268 Trace.formatln("to_x: {}", cast(double)toX); 269 Trace.formatln("getX: {}", cast(double)getX()); 276 debug(Animator) 277 { 278 Trace.formatln("now_x: {}", cast(double)now_x); 279 Trace.formatln("to_x: {}", cast(double)toX); 280 Trace.formatln("getX: {}", cast(double)getX()); 281 } 270 282 271 283 if( now_x < 0.001f && now_x > -0.001f ) 272 284 { 273 Trace.formatln("xDone.");285 debug(Animator) Trace.formatln("xDone."); 274 286 xDone = true; 275 287 setX( toX ); … … 284 296 { 285 297 float now_y = toY - getY(); 286 Trace.formatln("now_y: {}", cast(double)now_y);298 debug(Animator) Trace.formatln("now_y: {}", cast(double)now_y); 287 299 if( now_y < 0.001f && now_y > -0.001f ) 288 300 { 289 Trace.formatln("yDone.");301 debug(Animator) Trace.formatln("yDone."); 290 302 yDone = true; 291 303 setY( toY ); … … 313 325 if( xDone == true && yDone == true && zDone == true ) 314 326 { 315 Trace.formatln("All Done."); 327 debug(Animator) Trace.formatln("All Done."); 328 329 if( whenFinished !is null ) 330 whenFinished(); 316 331 317 332 /*if( owner !is null ) trunk/pihlaja/src/shiraz/ui/SubWindow.d
r63 r64 817 817 //Trace.formatln("controlWidget.panret name: {}", controlWidget.parent.name ); 818 818 //controlWidget.parent.remove(controlWidget); 819 controlWidget.removeFromParent(); 819 820 //controlWidget. 821 //super. 822 aAnim( 0.0f, &controlWidget.removeFromParent ); 823 824 //controlWidget.removeFromParent(); 820 825 } 821 826 } … … 849 854 Trace.formatln("Adding maximize animations."); 850 855 856 //The simplified API: 857 controlWidget.moveToAnim(0.0f, 0.0f, 0.0f); 858 controlWidget.sizeAnim( controlWidget.parent.w, controlWidget.parent.h ); 859 860 //The more detailed API: 861 /* 851 862 Animator to_anim = new Animator(controlWidget, &controlWidget.xPos, &controlWidget.xPos, &controlWidget.yPos, &controlWidget.yPos, null, null ); 852 863 to_anim.animateTo( 0.0f, 0.0f, 0.0f ); … … 854 865 Animator wh_anim = new Animator(controlWidget, &controlWidget.w, &controlWidget.w, &controlWidget.h, &controlWidget.h, null, null ); 855 866 wh_anim.animateTo( controlWidget.parent.w, controlWidget.parent.h, 0.0f ); 867 */ 856 868 857 869 /* … … 1165 1177 draw.pushTexture( framebufferObject ); 1166 1178 1167 //glColor4f(r, g, b, a);1168 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);1179 glColor4f(r, g, b, a); 1180 //glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 1169 1181 //applyColour(); 1170 1182 … … 1196 1208 //TODO 1197 1209 //glColor4f(r*0.5f, g*0.5f, b*0.5f, a); 1198 glColor4f(0.0f, 0.0f, 0.0f, 1.0f);1210 glColor4f(0.0f, 0.0f, 0.0f, a*0.5f); 1199 1211 draw.stroke( shape ); 1200 1212 } … … 1461 1473 */ 1462 1474 1475 /* 1463 1476 //Colour is overridden to control container widget. 1464 1477 float r() { return ((container is null) ? _colour_data[0] : container.r); } … … 1467 1480 float a() { return ((container is null) ? _colour_data[3] : container.a); } 1468 1481 1469 1470 1471 1482 float r( float set ) { return ((container is null) ? (_colour_data[0] = set) : (container.r = set)); } 1472 1483 float g( float set ) { return ((container is null) ? (_colour_data[1] = set) : (container.g = set)); } 1473 1484 float b( float set ) { return ((container is null) ? (_colour_data[2] = set) : (container.b = set)); } 1474 1485 float a( float set ) { return ((container is null) ? (_colour_data[3] = set) : (container.a = set)); } 1475 1486 */ 1487 1488 //br stands for "background red". So these are background colours, 1489 //or container background colours. 1490 float br() { return ((container is null) ? _colour_data[0] : container.r); } 1491 float bg() { return ((container is null) ? _colour_data[1] : container.g); } 1492 float bb() { return ((container is null) ? _colour_data[2] : container.b); } 1493 float ba() { return ((container is null) ? _colour_data[3] : container.a); } 1494 1495 float br( float set ) { return ((container is null) ? (_colour_data[0] = set) : (container.r = set)); } 1496 float bg( float set ) { return ((container is null) ? (_colour_data[1] = set) : (container.g = set)); } 1497 float bb( float set ) { return ((container is null) ? (_colour_data[2] = set) : (container.b = set)); } 1498 float ba( float set ) { return ((container is null) ? (_colour_data[3] = set) : (container.a = set)); } 1499 1500 void backgroundColour( float set_r, float set_g, float set_b, float set_a ) 1501 { 1502 if( container !is null ) 1503 container.colour( set_r, set_g, set_b, set_a ); 1504 else colour( set_r, set_g, set_b, set_a ); 1505 } 1476 1506 1477 1507 //class Header? … … 1509 1539 this() 1510 1540 { 1541 Trace.formatln("Menu.this() START."); 1542 scope(exit) Trace.formatln("Menu.this() END."); 1543 1511 1544 super(); 1512 1545 name = "Menu"; … … 1515 1548 } 1516 1549 1517 /*1518 1550 void add(MenuItem add_item) 1519 1551 { 1552 add_item.createMenuWindow(); 1520 1553 super.add(add_item); 1521 MenuWindow menuwin = new MenuWindow(); 1522 menuwin.defaultSize( 0.3f, 0.4f ); 1523 menuWindows.append(menuwin); 1524 } 1525 */ 1554 } 1526 1555 1527 1556 //LinkSeq!(MenuWindow) menuWindows; … … 1531 1560 { 1532 1561 public: 1533 this(char[] set_name, ) 1562 this(char[] set_name ) 1563 { 1564 Trace.formatln("MenuItem.this() START."); 1565 scope(exit) Trace.formatln("MenuItem.this() END."); 1566 1567 super(set_name); 1568 1569 isOutline = false; 1570 1571 padding = 0.0f; 1572 1573 texture = null; 1574 1575 } 1576 1577 //internal: 1578 public void createMenuWindow() 1534 1579 { 1535 1580 menuWindow = new MenuWindow(); 1536 1581 menuWindow.defaultSize( 0.25f, 0.35f ); 1537 1538 super(set_name); 1539 1540 padding = 0.0f; 1541 1542 //signalActivate.attach(&showMenuWindow); 1582 1583 //signalActivate.attach(&showMenuWindow); 1543 1584 signalMouseButtonPress.attach(&showMenuWindow); 1544 1585 signalMouseButtonRelease.attach(&hideMenuWindow); 1545 1586 } 1546 1587 1588 1547 1589 /* 1548 1590 void renderChildren(Draw draw) … … 1567 1609 { 1568 1610 input.isHandled = true; 1569 1611 1570 1612 if( menuWindow !is null ) 1571 1613 { 1572 rootWindow.add( menuWindow ); 1614 menuWindow.a = 0.0f; 1615 if( menuWindow.parent is null ) 1616 { 1617 Trace.formatln("Adding menuWindow into rootWindow for the first time."); 1618 rootWindow.add( menuWindow ); 1619 } 1620 menuWindow.show(); 1621 menuWindow.sendToTop(); 1622 menuWindow.aAnim(1.0f); 1573 1623 } 1574 1624 } … … 1580 1630 if( menuWindow !is null ) 1581 1631 { 1582 rootWindow.remove( menuWindow ); 1632 //menuWindow.aAnim(0.0f, &menuWindow.removeFromParent ); 1633 menuWindow.aAnim(0.0f, &menuWindow.hide ); 1583 1634 } 1584 1635 } … … 1592 1643 this() 1593 1644 { 1645 Trace.formatln("MenuWindow.this() START."); 1646 scope(exit) Trace.formatln("MenuWindow.this() END."); 1647 1594 1648 super("MenuWindow", WindowHeaderType.NONE, WindowHeaderType.NONE ); 1595 1649 1596 //auto emptyButton31 = new MenuItem("Menuitem 1"); 1650 1651 auto emptyButton31 = new MenuItem("Menuitem 1"); 1597 1652 //emptyButton31.signalActivate.attach(&clickHandler3); 1598 //add( emptyButton31 ); 1653 add( emptyButton31 ); 1654 1655 auto emptyButton32 = new MenuItem("Menuitem 2"); 1656 //emptyButton31.signalActivate.attach(&clickHandler3); 1657 add( emptyButton32 ); 1658 1659 auto emptyButton33 = new MenuItem("Menuitem 3"); 1660 //emptyButton31.signalActivate.attach(&clickHandler3); 1661 add( emptyButton33 ); 1662 1663 1599 1664 } 1600 1665 trunk/pihlaja/src/shiraz/ui/Window.d
r63 r64 1233 1233 foreach(Rectangle wid; itemList) 1234 1234 { 1235 wid.idle(); 1235 if( wid !is null ) 1236 wid.idle(); 1236 1237 } 1237 1238 … … 1258 1259 foreach(Rectangle wid; itemList) 1259 1260 { 1260 wid.render(draw); 1261 if( wid !is null ) 1262 wid.render(draw); 1261 1263 } 1262 1264
