Handbook
Glossary
(add-button-gadgets) ( gadget pile -- )
Vocabulary
game
.
input
.
demos
.
joysticks
Inputs
gadget
an
object
pile
an
object
Outputs
None
Definition
USING:
accessors
game.input
grouping
kernel
math.parser
sequences
ui.gadgets
ui.gadgets.buttons
ui.gadgets.packs
;
IN:
game.input.demos.joysticks
::
(add-button-gadgets)
( gadget pile -- )
gadget
controller>>
read-controller
buttons>>
dup
length
button-pref-dim
:>
pref-dim
length
<iota>
[
number>string
[
drop
]
<border-button>
pref-dim
>>pref-dim
]
map
:>
buttons buttons gadget
buttons<<
buttons 32
group
[
[
<shelf>
]
dip
[
add-gadget
]
each
pile
swap
add-gadget
drop
]
each
;