Hide mouse help after presentation is ungrafted
parent
b7aa4f360b
commit
4ed790c2b6
|
@ -29,7 +29,6 @@
|
|||
space
|
||||
- we have trouble drawing rectangles
|
||||
- UI dataflow visualizer
|
||||
- status help persists after clicking on a link
|
||||
- tool help
|
||||
- browser: show currently selected vocab & words
|
||||
- doc sweep
|
||||
|
|
|
@ -36,6 +36,9 @@ C: presentation ( button object commands -- button )
|
|||
: hide-mouse-help ( presentation -- )
|
||||
find-world [ world-status f swap set-model* ] when* ;
|
||||
|
||||
M: presentation ungraft* ( presentation -- )
|
||||
dup hide-mouse-help delegate ungraft* ;
|
||||
|
||||
presentation H{
|
||||
{ T{ button-up f f 1 } [ [ 1 invoke-presentation ] if-clicked ] }
|
||||
{ T{ button-up f f 2 } [ [ 2 invoke-presentation ] if-clicked ] }
|
||||
|
|
|
@ -64,6 +64,7 @@ TUPLE: key-up mods sym ;
|
|||
! are in the co-ordinate system of the world which contains
|
||||
! the gadget in question.
|
||||
SYMBOL: hand-gadget
|
||||
SYMBOL: hand-world
|
||||
SYMBOL: hand-loc
|
||||
{ 0 0 } hand-loc set-global
|
||||
|
||||
|
@ -146,6 +147,7 @@ V{ } clone hand-buttons set-global
|
|||
hand-gadget get-global parents <reversed> ;
|
||||
|
||||
: move-hand ( loc world -- )
|
||||
dup hand-world set-global
|
||||
under-hand >r over hand-loc set-global
|
||||
pick-up hand-gadget set-global
|
||||
under-hand r> hand-gestures ;
|
||||
|
|
|
@ -28,7 +28,7 @@ SYMBOL: windows
|
|||
|
||||
: update-hand ( gadget -- )
|
||||
find-world [
|
||||
dup hand-gadget get-global find-world eq?
|
||||
dup hand-world get-global eq?
|
||||
[ hand-loc get-global swap move-hand ] [ drop ] if
|
||||
] when* ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue