Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Mouse-position/Factor/mouse-position.factor
Normal file
13
Task/Mouse-position/Factor/mouse-position.factor
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
: replace-text ( button text -- )
|
||||
[ drop children>> pop drop ] [ >label add-gadget drop ] 2bi ;
|
||||
: present-locations ( loc1 loc2 -- string )
|
||||
[
|
||||
first2 [ number>string ] bi@ "," glue
|
||||
] bi@ ";" glue ;
|
||||
: example ( -- ) "click me"
|
||||
[
|
||||
dup hand-rel ! location relative to the button
|
||||
hand-loc get ! location relative to the window
|
||||
present-locations replace-text
|
||||
]
|
||||
<border-button> gadget. ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue