Home › Forums › General › Programming › button array method? › Reply To: button array method?
September 17, 2017 at 10:31 am
#72951
so why doesn’t this work? (i’ve tried plain ‘getValue’, and have tried
getComponent) – all buttons call the same method with mouseDown.
function partViewSelect()
-- This stops issues during panel bootup
if panel:getRestoreState() or panel:getProgramState() then return end
--uiTab
tabs_timbreParams = panel:getModulatorByName("tabs_timbreParams")
--buttons
partSel1 = panel:getModulatorByName("partSel1"):getModulatorValue()
partSel2 = panel:getModulatorByName("partSel2"):getModulatorValue()
partSel3 = panel:getModulatorByName("partSel3"):getModulatorValue()
partSel4 = panel:getModulatorByName("partSel4"):getModulatorValue()
partSel5 = panel:getModulatorByName("partSel5"):getModulatorValue()
partSel6 = panel:getModulatorByName("partSel6"):getModulatorValue()
partSel7 = panel:getModulatorByName("partSel7"):getModulatorValue()
partSel8 = panel:getModulatorByName("partSel8"):getModulatorValue()
if partSel1 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 0)
elseif partSel2 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 1)
elseif partSel3 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 2)
elseif partSel4 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 3)
elseif partSel5 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 4)
elseif partSel6 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 5)
elseif partSel7 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 6)
elseif partSel8 ~= nil then tabs_timbreParams:setPropertyInt("uiTabsCurrentTab", 7)
end
end