rollout unnamedRollout "Untitled" 162 height:235
(
spinner spn1 "球体半径" pos:[18,14] 119 height:16
spinner spn2 "球体数目" pos:[15,49] 119 height:16 type:#integer
progressBar pb1 "进度条" pos:[12,97] 123 height:18 color:(color 255 0 0)
button btn4 "随机移动" pos:[16,142] 110 height:25 type:#integer
on spn1 changed val do
(
for a in selection where classof a == sphere do a.radius = spn1.value
)
on spn2 changed val do
(
c=#()
for a in selection where classof a==sphere do append c a
spn2.value = c.count
)
on btn4 pressed do
(
for a in selection do
for t=0 to 100 by 1 do
animate on
at time t
(
a.pos.x=(t*(random 1.0 5.0))
pb1.value=t
)
pb1.value=0
)
)
createdialog unnamedRollout