More UI fixes
parent
79bcbff3ec
commit
12b7a927b0
|
@ -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+ ;
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue