From 80783019c2773a0416d304baac7b4ce32b11a3cd Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos <dharmatech@finkelstein.stackeffects.info> Date: Sat, 12 Jul 2008 17:57:57 -0500 Subject: [PATCH] ui.gadgets: cleaner fast-children-on --- extra/ui/gadgets/gadgets.factor | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/extra/ui/gadgets/gadgets.factor b/extra/ui/gadgets/gadgets.factor index 6f49791164..f5e1f35081 100755 --- a/extra/ui/gadgets/gadgets.factor +++ b/extra/ui/gadgets/gadgets.factor @@ -74,13 +74,9 @@ M: gadget children-on nip children>> ; swapd [ rect-loc v- over v. 0 <=> ] binsearch nip ; : fast-children-on ( rect axis children -- from to ) - 3dup - >r >r dup rect-loc swap rect-dim v+ - r> r> (fast-children-on) ?1+ - >r - >r >r rect-loc - r> r> (fast-children-on) 0 or - r> ; + [ >r >r rect-loc r> r> (fast-children-on) 0 or ] + [ >r >r dup rect-loc swap rect-dim v+ r> r> (fast-children-on) ?1+ ] + 3bi ; : inside? ( bounds gadget -- ? ) dup visible?>> [ intersects? ] [ 2drop f ] if ;