Update hand gadget on relayout
parent
91589bced9
commit
ece98fdad6
|
@ -24,13 +24,18 @@ SYMBOL: windows
|
||||||
windows get-global [ second eq? ] find-with drop
|
windows get-global [ second eq? ] find-with drop
|
||||||
windows get-global [ length 1- ] keep exchange ;
|
windows get-global [ length 1- ] keep exchange ;
|
||||||
|
|
||||||
|
: update-hand ( world -- )
|
||||||
|
dup hand-gadget get-global find-world eq?
|
||||||
|
[ hand-loc get-global swap move-hand ] [ drop ] if ;
|
||||||
|
|
||||||
|
: post-layout ( gadget -- )
|
||||||
|
find-world [ dup update-hand dup world-handle set ] when* ;
|
||||||
|
|
||||||
: layout-queued ( -- )
|
: layout-queued ( -- )
|
||||||
invalid dup queue-empty? [
|
invalid dup queue-empty? [
|
||||||
drop
|
drop
|
||||||
] [
|
] [
|
||||||
deque dup layout
|
deque dup layout post-layout layout-queued
|
||||||
find-world [ dup world-handle set ] when*
|
|
||||||
layout-queued
|
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: init-ui ( -- )
|
: init-ui ( -- )
|
||||||
|
|
Loading…
Reference in New Issue