More UI fixes

release
slava 2006-03-19 07:43:06 +00:00
parent 79bcbff3ec
commit 12b7a927b0
4 changed files with 6 additions and 4 deletions

View File

@ -68,8 +68,7 @@ TUPLE: editor line caret font color ;
] with-editor ;
: click-editor ( editor -- )
dup hand-click-loc get-global relative-loc
first over set-caret-x request-focus ;
dup hand-click-rel first over set-caret-x request-focus ;
: popup-location ( editor -- loc )
dup screen-loc swap editor-caret rect-extent nip v+ ;

View File

@ -79,6 +79,9 @@ C: hand ( -- hand )
: drag-loc ( gadget -- loc )
hand get rect-loc hand-click-loc get-global v- ;
: hand-click-rel ( gadget -- loc )
hand-click-loc get-global relative-loc ;
: relevant-help ( seq -- help )
[ gadget-help ] map [ ] find nip ;

View File

@ -17,7 +17,7 @@ namespaces sequences ;
find-world dup hide-glass update-hand update-clicked ;
: menu-actions ( glass -- )
dup [ retarget-drag ] [ drag ] set-action
! dup [ retarget-drag ] [ drag ] set-action
[ retarget-click ] [ button-down ] set-action ;
: menu-loc ( loc menu world -- loc )

View File

@ -70,7 +70,7 @@ SYMBOL: slider-changed
[ slider-page * ] keep slide-by ;
: elevator-click ( elevator -- )
dup hand-click-loc relative-loc >r find-slider r>
dup hand-click-rel >r find-slider r>
over gadget-orientation v.
over screen>slider over slider-value - sgn
swap slide-by-page ;