Home › Forums › General › Programming › Midi Settings dialog from lua › Reply To: Midi Settings dialog from lua
October 20, 2017 at 4:45 pm
#73259
ok. what do you use for popups?
this is what i’m using for a single-option popup at the moment:
sendBank = function(mod, value)
--using a popup menu to perform an action
-- This variable stops index issues during panel bootup
if panel:getRestoreState() == true or panel:getProgramState() == true then
return
end
-- ////////////////// send preset menu ///////////////
send_Bank = PopupMenu() -- Main Menu
send_Bank:addSectionHeader ("copy bank to ext")
send_Bank:addSeparator()
send_Bank:addItem(1, "lcd_bankDataA", true, false, Image())
ret = send_Bank:show(0,0,0,0)
-- /////////////////// MENU ACTIONS //////////////////
if ret == 0 then
return
end
if ret == 1 then
local s=L(panel:getComponent("lcd_bankDataA"):getProperty("uiLabelText"))
panel:getComponent("lcd_bankDataB"):setPropertyString("uiLabelText",""..s)
end
end