I'm playing around with panel scripts. I'm trying to add a button to hide an instrument but it won't show up.
Code: Select all
button_id = button_add("knob_arc.png", "knob_arc_pressed.png", 10,10,200,200,callback_pressed, callback_released)
Code: Select all
button_id = button_add("knob_arc.png", "knob_arc_pressed.png", 10,10,200,200,callback_pressed, callback_released)
Code: Select all
-- Instrument to Hide/Show
local instrument = {
state = false,
uuid = "92ad64fd-fa71-4266-add9-f7ac71c2b2cf"
}
instrument.id = instrument_get(instrument.uuid)
-- Instrument Clickspot
instrument.set = function ()
instrument.state = not instrument.state
instrument.display()
end
instrument.clickspot = button_add(nil, nil, 0, 800, 100, 100, instrument.set)
-- Hide/Show Instrument
instrument.display = function ()
visible(instrument.id, instrument.state)
end
-- Initialze Panel
instrument.display()
-- END