Files
tools/接口/UITestRollout.ms
T
2025-07-31 16:05:55 +08:00

280 lines
8.0 KiB
Plaintext

if TestRollout != undefined do (try(destroydialog TestRollout)catch())
rollout abc "简介" width:300 height:600
(
bitmap bmp1 "Bitmap" pos:[10,10] width:285 height:140 align:#center fileName:("C:\Users\ab\Desktop\RigTool\ctrlcolor\mainabout.png") --bitmap:(bitmap 285 140 color:[255,255,255])
button btn01 "功能1" width:50 height:30 pos:[20,20]
)
rollout def "UI" width:300 height:600
(
edittext edittextbox "编辑框" width:280
--colorPicker thecolor "" color:[0,255,0] modal:false width:350 height:300
on thecolor changed newcolor do selection.wirecolor = newcolor
slider sliderui "滑块" ticks:5 range:[0,100,1] type:#integer
listbox fjfjf "列表盒" item:["1","2"] selection:1 height:2 orient:#horizontal --vertical
pickbutton pickname "拾取按钮"
radiobuttons djfsgkjk "单选" labels:#("1","2")
checkbox mycheckbox "是否选择"
button btn001 "按钮001" width:50 height:20 tooltip:"白色" images:#("C:\Users\ab\Desktop\3.png",undefined,1,1,1,1,1 )
checkbutton mycheckbutton "检查按钮"
dropdownList mydropdownlist "下拉菜单" items:#("1","2","3","4","5","6") height:4
progressBar my_progressbar value:70 color:red across:3
button mybutton "进度条+1"
on btn001 pressed do
(
--format ("name:%s\ncaption:%s\ntext:%s\n" edittext.name edittext.caption edittext.text)
)
on mycheckbox changed thestate do
messageBox ("changed!!!current state is "+mycheckbox.state as string)
on mycheckbox rightclick do
messageBox "the checkbox RightClick!!"
on mycheckbutton changed state do
if state ==on then -- if mycheckbutton.state ==on then
messageBox "checkbutton is on"
else
messageBox "checkbutton is off"
on mydropdownlist selected i do
(
print mydropdownlist.selection
)
on my_progressbar clicked i do
(
print i
my_progressbar.value=i
)
label progressbar_percent_1 ""
label progressbar_percent "%"
on mybutton pressed do
(
print my_progressbar.value
if my_progressbar.value >=100 then
my_progressbar.value=0
else
my_progressbar.value=my_progressbar.value+1
progressbar_percent_1.text=my_progressbar.value as string
)
timer clock "计时器" Interval:1000
local timertick=0
on clock tick do
(
timertick=timertick+1
print timertick
if my_progressbar.value >=100 then
my_progressbar.value=0
else
my_progressbar.value=my_progressbar.value+1
progressbar_percent_1.text=my_progressbar.value as string
if clock.active == true then print "Tick!!"
--clock.active=false --close the timer
)
spinner my_spinner "微调器" range:[0,100,1]
on my_spinner changed i do print i --my_spinner.value
edittext my_edittext "编辑文本" multiline:true height:100 fieldwidth:200
combobox my_combobox "组合框" items:#("1","2","3","4","5") width:60
)
rollout Advancedmodules "模块高级设置工具" width:300 height:600
(
local imagespath=#("","","","","","","","","","")
label label01 "----------------覆盖模块颜色------------------"
button ctrlcolor01 "1" width:50 height:20 across:5
button ctrlcolor02 "2" width:50 height:20
button ctrlcolor03 "3" width:50 height:20
button ctrlcolor04 "4" width:50 height:20
button ctrlcolor05 "5" width:50 height:20
button ctrlcolor06 "6" width:50 height:20 across:5
button ctrlcolor07 "7" width:50 height:20
button ctrlcolor08 "8" width:50 height:20
button ctrlcolor09 "9" width:50 height:20
button ctrlcolor10 "10" width:50 height:20
colorPicker thecolor "" color:[255,0,0] modal:false width:280 height:20
label label02 ""
label label03 ""
label label04 "----------------重命名模块------------------"
edittext modules_name "模块新名称" width:250 align:#center
button modules_name_apply "应用模块名称" width:150 align:#center height:30
label label05 ""
label label06 ""
label label07 "----------------模块父节点------------------"
edittext modules_parent "新链接模块" width:240 align:#left across:2
button modules_parent_load "载入" width:30 align:#right
button modules_parent_apply "将选定模块链接到新模块" width:150 align:#center height:30
label label08 ""
label label09 ""
label label10 "----------------删除模块------------------"
button modules_delete "删除选定模块" width:150 align:#center height:30
on Advancedmodules open do
(
for i =1 to 10 do imagespath[i]=("C:\Users\ab\Desktop\RigTool\ctrlcolor\\"+ i as string +".png")
ctrlcolor01.images=#(imagespath[1],(bitmap 50 20 color:[0,0,0]),1,1,1,1,1)
ctrlcolor02.images=#(imagespath[2],undefined,1,1,1,1,1)
ctrlcolor03.images=#(imagespath[3],undefined,1,1,1,1,1)
ctrlcolor04.images=#(imagespath[4],undefined,1,1,1,1,1)
ctrlcolor05.images=#(imagespath[5],undefined,1,1,1,1,1)
ctrlcolor06.images=#(imagespath[6],undefined,1,1,1,1,1)
ctrlcolor07.images=#(imagespath[7],undefined,1,1,1,1,1)
ctrlcolor08.images=#(imagespath[8],undefined,1,1,1,1,1)
ctrlcolor09.images=#(imagespath[9],undefined,1,1,1,1,1)
ctrlcolor10.images=#(imagespath[10],undefined,1,1,1,1,1)
)
)
rollout RTctrlsetup "控制器设置" width:300 height:600
(
local imagespath=#("","","","","","","","","","")
label label01 "----------------控制器颜色------------------"
button ctrlcolor01 "1" width:50 height:20 across:5
button ctrlcolor02 "2" width:50 height:20
button ctrlcolor03 "3" width:50 height:20
button ctrlcolor04 "4" width:50 height:20
button ctrlcolor05 "5" width:50 height:20
button ctrlcolor06 "6" width:50 height:20 across:5
button ctrlcolor07 "7" width:50 height:20
button ctrlcolor08 "8" width:50 height:20
button ctrlcolor09 "9" width:50 height:20
button ctrlcolor10 "10" width:50 height:20
colorPicker thecolor "" color:[255,0,0] modal:false width:280 height:20
label label02 ""
label label03 ""
label label04 "----------------控制器缩放------------------"
checkbox x_scale "X轴局部" across:4 align:#left
checkbox y_scale "Y轴局部" align:#center
checkbox z_scale "Z轴局部" align:#center
checkbox mirror_scale "镜像" align:#right
slider scale_parmeter "" ticks:5 range:[0,100,50] type:#integer width:280 align:#center
label label05 "缩放比例:50%" align:#center
on RTctrlsetup open do
(
for i =1 to 10 do imagespath[i]=("C:\Users\ab\Desktop\RigTool\ctrlcolor\\"+ i as string +".png")
ctrlcolor01.images=#(imagespath[1],(bitmap 50 20 color:[0,0,0]),1,1,1,1,1)
ctrlcolor02.images=#(imagespath[2],undefined,1,1,1,1,1)
ctrlcolor03.images=#(imagespath[3],undefined,1,1,1,1,1)
ctrlcolor04.images=#(imagespath[4],undefined,1,1,1,1,1)
ctrlcolor05.images=#(imagespath[5],undefined,1,1,1,1,1)
ctrlcolor06.images=#(imagespath[6],undefined,1,1,1,1,1)
ctrlcolor07.images=#(imagespath[7],undefined,1,1,1,1,1)
ctrlcolor08.images=#(imagespath[8],undefined,1,1,1,1,1)
ctrlcolor09.images=#(imagespath[9],undefined,1,1,1,1,1)
ctrlcolor10.images=#(imagespath[10],undefined,1,1,1,1,1)
)
on scale_parmeter changed val do
(
label05.text=("缩放比例:"+ val as string+"%")
)
on thecolor changed newcolor do selection.wirecolor = newcolor
)
rollout TestRollout "Test" width:700 height:60
(
checkbutton btnsub1 "button" width:50 height:20 across:5
button btnsub2 "button" width:50 height:20
button btnsub3 "button" width:50 height:20
button btnsub4 "button" width:50 height:20
button btnsub5 "button" width:50 height:20
button btnsub6 "button" width:50 height:20 across:5
button btnsub7 "button" width:50 height:20
button btnsub8 "button" width:50 height:20
button btnsub9 "button" width:50 height:20
button btnsub10 "button" width:50 height:20
subrollout RTleft "" height:600 across:2
subrollout RTright "" height:600 across:2
on btnsub1 changed thestate do
if thestate then
(
TestRollout.height +=600
addsubrollout TestRollout.RTleft abc
addsubrollout TestRollout.RTleft def
addsubrollout TestRollout.RTright Advancedmodules
addsubrollout TestRollout.RTright RTctrlsetup
)
else
(
TestRollout.height -=600
removesubrollout TestRollout.RTleft abc
removesubrollout TestRollout.RTleft def
removesubrollout TestRollout.RTright Advancedmodules
removesubrollout TestRollout.RTright RTctrlsetup
)
)
createDialog TestRollout