ui.gadgets: cleaner fast-children-on
							parent
							
								
									33da43aa90
								
							
						
					
					
						commit
						80783019c2
					
				| 
						 | 
					@ -74,13 +74,9 @@ M: gadget children-on nip children>> ;
 | 
				
			||||||
    swapd [ rect-loc v- over v. 0 <=> ] binsearch nip ;
 | 
					    swapd [ rect-loc v- over v. 0 <=> ] binsearch nip ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: fast-children-on ( rect axis children -- from to )
 | 
					: fast-children-on ( rect axis children -- from to )
 | 
				
			||||||
    3dup
 | 
					  [ >r >r rect-loc r> r> (fast-children-on) 0 or ]
 | 
				
			||||||
    >r >r dup rect-loc swap rect-dim v+
 | 
					  [ >r >r dup rect-loc swap rect-dim v+ r> r> (fast-children-on) ?1+ ]
 | 
				
			||||||
    r> r> (fast-children-on) ?1+
 | 
					  3bi ;
 | 
				
			||||||
    >r
 | 
					 | 
				
			||||||
    >r >r rect-loc
 | 
					 | 
				
			||||||
    r> r> (fast-children-on) 0 or
 | 
					 | 
				
			||||||
    r> ;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
: inside? ( bounds gadget -- ? )
 | 
					: inside? ( bounds gadget -- ? )
 | 
				
			||||||
    dup visible?>> [ intersects? ] [ 2drop f ] if ;
 | 
					    dup visible?>> [ intersects? ] [ 2drop f ] if ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue