Handbook
Glossary
simulation-panel ( boids-gadget -- gadget )
Vocabulary
boids
Inputs
boids-gadget
an
object
Outputs
gadget
an
object
Definition
USING:
accessors
kernel
models.range
ui.gadgets
ui.gadgets.borders
ui.gadgets.buttons
ui.gadgets.frames
ui.gadgets.grids
ui.gadgets.labeled
ui.gadgets.labels
ui.gadgets.packs
ui.gadgets.sliders
ui.theme
ui.tools.common
;
IN:
boids
::
simulation-panel
( boids-gadget -- gadget )
<pile>
white-interior
2 2
<frame>
{
2 4
}
>>gap
{
0 0
}
>>filled-cell
"population"
<label>
{
0 0
}
grid-add
initial-population
0 0 200 10
<range>
dup
[
boids-gadget
set-population
]
connect
horizontal
<slider>
{
1 0
}
grid-add
"speed"
<label>
{
0 1
}
grid-add
boids-gadget
dt>>
0 1 10 1
<range>
dup
[
boids-gadget
dt<<
]
connect
horizontal
<slider>
{
1 1
}
grid-add
{
5 5
}
<border>
add-gadget
<shelf>
{
2 2
}
>>gap
"pause"
[
drop
boids-gadget
com-pause
]
<border-button>
add-gadget
"randomize"
[
drop
boids-gadget
com-randomize
]
<border-button>
add-gadget
{
5 5
}
<border>
add-gadget
"simulation"
heading-color
<framed-labeled-gadget>
;