Handbook
Glossary
behavior-panel ( behavior -- gadget )
Vocabulary
boids
Inputs
behavior
an
object
Outputs
gadget
an
object
Definition
USING:
accessors
classes
kernel
math
math.functions
models.range
ui.gadgets
ui.gadgets.borders
ui.gadgets.frames
ui.gadgets.grids
ui.gadgets.labeled
ui.gadgets.labels
ui.gadgets.sliders
ui.theme
ui.tools.common
;
IN:
boids
::
behavior-panel
( behavior -- gadget )
2 3
<frame>
white-interior
{
2 4
}
>>gap
{
0 0
}
>>filled-cell
"weight"
<label>
{
0 0
}
grid-add
behavior
weight>>
100
*
>fixnum
0 0 200 1
<range>
dup
[
100.0
/
behavior
weight<<
]
connect
horizontal
<slider>
{
1 0
}
grid-add
"radius"
<label>
{
0 1
}
grid-add
behavior
radius>>
0 0 100 1
<range>
dup
[
behavior
radius<<
]
connect
horizontal
<slider>
{
1 1
}
grid-add
"angle"
<label>
{
0 2
}
grid-add
behavior
angle-cos>>
acos
rad>deg
>fixnum
0 0 180 1
<range>
dup
[
deg>rad
cos
behavior
angle-cos<<
]
connect
horizontal
<slider>
{
1 2
}
grid-add
{
5 5
}
<border>
white-interior
behavior
class-of
name>>
heading-color
<framed-labeled-gadget>
;