It is possible to show custom views and attach notifiers to buttons (the ones you call with say vb:button{ “This is a placeholder!” }) in those views, but what about for the bottom buttons in a custom prompt created using renoise.app():show_custom_prompt? Suppose for example I call
function main()
local vb = renoise.ViewBuilder()
local my_view = vb:row {
vb:text {
text = "My content"
}
}
local modal_popup = renoise.app():show_custom_prompt("My window", my_view, { "Abort", "OK" })
-- script resumes here once a button is pressed
if modal_popup == "Abort" then
print("Abort button was pressed")
elseif modal_popup == "OK" then
print("OK button was pressed")
else
print("The window was closed")
end
end
main()
NB1. the close [x] button will return the text “Cancel”.
NB2. It’s a lot more common to use non modal dialogs (:show_custom_dialog). The modal dialog will steal all focus, which can be quite annoying imo.