• 其实可以用这个方法创建按钮,效果会不错。


    macroscript MorpherFloater category:"HowTo"


    (

    global mf_float, mf_morpher_mod

    on isEnabled return

     selection.count == 1 and (try($.morpher)catch(undefined)) != undefined

    on execute do

    (

     mf_morpher_mod = $.modifiers[#morpher]

     used_channels = #()

     txt ="rollout mf_main \"Morpher Floater\" (\n"

     for i = 1 to 100 do

     (

      if WM3_MC_HasData mf_morpher_mod i then

      (

       append used_channels i

       txt +="progressbar mf_slider_"+ i as string

       txt +=" value:"+ (WM3_MC_GetValue mf_morpher_mod i) as string

       txt +=" 100 height:18 across:3 align:#left\n"

       txt +="edittext mf_label_"+i as string

       txt +="  text:\""+i as string+": "

       txt +=(WM3_MC_GetName mf_morpher_mod i) +"\"\n"
     txt += "button theButton_"+i as string + "\n"
       txt +="toolTip:\""+"sdfgsdf"+"\""+"\n"

       txt +="on mf_slider_"+i as string+" clicked val do (\n"

       txt +="WM3_MC_SetValue mf_morpher_mod "

       txt += i as string+" (val as float) \n"

       txt +="SliderTime +=0)\n"

      )

     )--end i loop

    txt +=")\n"

    createDialog (execute txt) 340 (used_channels.count*50)

    txt ="fn mf_update_slider = (\n"

    for i in used_channels do

    (

     txt +="mf_main.mf_slider_"+i as string

     txt +=".value = WM3_MC_GetValue mf_morpher_mod "+i as string+" \n"

    )--end i loop

    txt +=")\n"

    global mf_update_slider = execute txt

    registertimecallback mf_update_slider

    deleteAllChangeHandlers id:#morpher_floater

    when parameters mf_morpher_mod changes \

     HandleAt:#RedrawViews \

     id:#morpher_floater do mf_update_slider()

    )--end if

    )--end script

  • 相关阅读:
    RabbitMQ 消息可靠性
    SpringBoot2.X+SpringAMQP 整合 RabbitMQ
    《红宝书》 |Array数组介绍及用法
    《红宝书》 |单例内置对象 |Global和Math
    js封装 |随机获取指定范围内的整数
    《红宝书》 |原始包装类型
    《红宝书》 |什么是对象
    js封装 |时间对象相关方法
    兼容 |ios移动端的时间对象
    《红宝书》 |基本引用类型-正则表达式RegExp
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2038478.html
Copyright © 2020-2023  润新知