创建一个按钮,你可以单击它,然后添加一个新按钮。
你必须创建一个动态UI,利用maxscript UI元素,将卷展栏构建为字符串,然后评估该字符串并打开新的卷展栏以更新你的UI;利用RolloutCreator(请参阅帮助文件)帮助您构建卷展栏,并打开新的卷展栏以更新您的UI,看下面的示例:
- global roll_buttons
- global build_rollout
- fn addAnotherButton = (
- roll_buttons_count += 1
- counter = roll_buttons_count as string
- roll_buttons += "button btn_" + counter + " "Button " + counter + ""
- "
- )
- roll_header = "
- rollout roll_test "test" (
- button btn_test "点击我"
- on btn_test pressed do (
- destroyDialog roll_test
- addAnotherButton()
- createDialog (buildRollout())
- )
- "
- roll_footer = "
复制代码 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |