[solved] Toggle button that change uiPanelBackgroundColour1 in lua

Home Forums General Using Ctrlr [solved] Toggle button that change uiPanelBackgroundColour1 in lua

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #70095
    arcangeli
    Participant
      • Topics: 9
      • Replies: 21
      • Total: 30

      Hi,

      I’ve got my Circuit panel almost finished 🙂
      The last thing that i want to add is a toggle button that change panelMidiOutputChannelDevice and the uiPanelBackgroundColour1. The toggle wotk for the MIDI output but not for the colour. I can’t find what’s wrong in my code.
      Someone can help me please?

      ChangeMIDIChannel = function(–[[CtrlrModulator –]] mod, –[[value –]] value)
      –console (“Value:” .. value)
      if value==0 then
      panel:setPropertyString(“panelMidiOutputChannelDevice”,”1″)
      panel:setPropertyString(“uiPanelBackgroundColour1”, “FFFFAAFF”)
      end
      if value==1 then
      panel:setPropertyString(“panelMidiOutputChannelDevice”,”2″)
      panel:setPropertyString(“uiPanelBackgroundColour1”, “FFAAFFAA”)
      end
      end

      I’ve tried to replace panel:setPropertyString(“uiPanelBackgroundColour1”, “FFFFAAFF”) by panel:getPanelEditor():setPropertyInt(“uiPanelBackgroundColour1”, “FFFFAAFF”) but Ctrlr crash when i run it.
      And last, is it possible to change (in this lua script) some colours on all components of the panel?
      For info, the Novation Circuit has 2 synth engine. One colored in pink and the other in green (there’s no screen). Having the same color on the panel may be great.

      Thanks

      • This topic was modified 7 years, 7 months ago by arcangeli.
      • This topic was modified 7 years, 7 months ago by arcangeli.
      #70100
      arcangeli
      Participant
        • Topics: 9
        • Replies: 21
        • Total: 30

        The first problem was under my eyes but can’t see it. Replaced panel:getPanelEditor():setPropertyInt by panel:getPanelEditor():setPropertyString.
        Now that part work well 😉

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The forum ‘Using Ctrlr’ is closed to new topics and replies.
      There is currently 0 users and 59 guests online
      No users are currently active
      Forum Statistics
      Threads: 2,495, Posts: 17,374, Members: 77,605
      Most users ever online was 12 on January 22, 2019 3:47 pm
      Ctrlr