Forum

    • Register
    • Login
    • Search
    • Categories

    RadioGroup Default

    Scripting Forum
    2
    2
    534
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healey
      d.healey last edited by

      What would be the best way to have a button in a radio group be active when the script is loaded? Currently if a button is not part of radioGroup it will remember its state each time the script loads but those that are part of a radioGroup default to off rather than recalling their previous state.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <Processor Type="ScriptProcessor" ID="radioGroupTest" Bypassed="0" Script="const var button1 = Content.addButton(&quot;button1&quot;, 0, 0);&#13;&#10;button1.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;const var button2 = Content.addButton(&quot;button2&quot;, 150, 0);&#13;&#10;button2.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;const var button3 = Content.addButton(&quot;button3&quot;, 300, 0);&#13;&#10;button3.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;button1.setValue(1);function onNoteOn()&#10;{&#10;&#9;&#10;}&#10;function onNoteOff()&#10;{&#10;&#9;&#10;}&#10;function onController()&#10;{&#10;&#9;&#10;}&#10;function onTimer()&#10;{&#10;&#9;&#10;}&#10;function onControl(number, value)&#10;{&#10;&#9;&#10;}&#10;">
        <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="1"
                      onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0"
                      onControlOpen="0"/>
        <ChildProcessors/>
        <Content>
          <Control type="ScriptButton" id="button1" value="0"/>
          <Control type="ScriptButton" id="button2" value="0"/>
          <Control type="ScriptButton" id="button3" value="0"/>
        </Content>
      </Processor>
      

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart last edited by

        Yes, that's strange. I'll check it out.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post

        20
        Online

        732
        Users

        5.4k
        Topics

        50.2k
        Posts