Knob / slider animation: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 21: Line 21:
Note the animation is in active development, expect the API to evolve rapidly, However, it will only improve with use and feedback, so if you try it and don't like something, please say.
Note the animation is in active development, expect the API to evolve rapidly, However, it will only improve with use and feedback, so if you try it and don't like something, please say.


== Example ==
== Examples ==
Basic usage:
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
  <?xml version="1.0" encoding="utf8"?>
  <?xml version="1.0" encoding="utf8"?>
Line 28: Line 29:
         <type>knob</type>
         <type>knob</type>
         <object-name>ALT-SEL</object-name>
         <object-name>ALT-SEL</object-name>
         <value>0.0</value>
         <value>0.0</value>b <!-- or property as usual for rotate animation -->
         <center>
         <center>
             <x-m>0.0</x-m><y-m>0.027</y-m><z-m>0.0238</z-m>
             <x-m>0.0</x-m><y-m>0.027</y-m><z-m>0.0238</z-m>
Line 57: Line 58:
             <binding>....</binding>
             <binding>....</binding>
         </ccw>
         </ccw>
    </animation>
</PropertyList>
</syntaxhighlight>
Custom shifted-usage
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="utf8"?>
<PropertyList>
  <animation>
        <type>knob</type>
        <object-name>Radio.TUNE</object-name>
        <value>0.0</value>
        <center>...</center>
        <axis>...</axis>
       
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/instrumentation/nav[0]/standby-frequency-mhz</property>
                <factor>1</factor>
                <min>108</min>
                <max>122</max>               
                <wrap>true</wrap>
            </binding>
        </action>
       
      <shift-action>
            <binding>
                <command>property-adjust</command>
                <property>/instrumentation/nav[0]/standby-frequency-mhz</property>
                <factor>0.05</factor>
            </binding>
        </shift-action>
     </animation>
     </animation>
  </PropertyList>
  </PropertyList>
</syntaxhighlight>
</syntaxhighlight>
580

edits

Navigation menu