一、按钮:
rollout li01 "按钮"
(
button anniu01 "按钮动作" pos:[50,5] width:80 height:20 toolTip:"这是box"
on anniu01 pressed do
(
box01=box length:20 width:10 height:60
box01.pos=[0,-5,-30]
sphere()
)
)
createdialog li01 200 300
二、背景按钮
label anniu02 "背景按钮"
mapbutton choosemap "<<none>>" tooltip:"选择背景图"
on choosemap picked texmap do
(
environmentmap=texmap
choosemap.text=classof texmap as string
)
三、材质按钮
label anniu03 "选择物体的材质"
materialbutton choosemtl "pick material"
on choosemtl picked mtl do
(
print mtl
if $ !=undefined do $.material=mtl
)
四、组合框
rollout li03 "combobox"
(
combobox scale_1 "scale" items:#("1/2","1/4","1/8","1/16")
on scale_1 selected i do
format "you are selected %\n!" scale_1.items[i]
)
createdialog li03 120 200
五、列表框
rollout li02 "listbox"
(
listbox a_01 "特性列表" width:100 items:#("11","4","8","16","mi")
on a_01 doubleclicked c do
/*双击任何一个条目,产生不同位置的方体!*/
d=box pos:[c*40,0,0]
)
createdialog li02 120 200
六、rollout li03 “下拉列表”
(
dropdownlist scale_2 "scale" items:#("1/2","1/4","1/8","1/16")
on scale_2 selected i do
format "you are selected %\n!" scale_2.items[i]
)
createdialog li03 200 180
七、文本框
rollout li04 "edittext"
(
edittext aa "文本" filedWidth:100 height:100
)
createdialog li04 160 120
八、
rollout li05 "分组框"
(
groupbox bb "groupbox" Width:100 height:100
)
createdialog li05 160 120
九、超级连接
rollout li06 "hyperLink"
(
hyperLink box01 "超级连接" color:blue hovercolor:red visitedcolor:yellow
)
createdialog li06 160 120
十、
rollout li02 "拾取颜色"
(
colorpicker foo "wire color:" color:[0,0,255]
on foo changed new_col do selection.wirecolor=new_col
)
createdialog li02 200 200