Reply To: Midi Settings dialog from lua

Home Forums General Programming Midi Settings dialog from lua Reply To: Midi Settings dialog from lua

#73259
human fly
Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    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
    Ctrlr