EDIT : I am trying to include the Autostart checkbox in my tool.The checkbox is already working (saved correctly in the file preferences.xml).But I encounter this problem…
And other problem:https://forum.renoise.com/t/lua-dialog-behind-renoise-window-after-startup/41738
This was bothering me for days.I thought it was due to something wrong in my code.but it’s not like that.
I have taken the Danoise demo tool as an example to apply a solution.
Use the line: "waiting_to_show_dialog = prefs.autostart.value"Following the clue in the code I come to this:
if self.waiting_to_show_dialog then
renoise.tool().app_idle_observable:add_notifier(self,self.idle_notifier_waiting)
end
The code use “renoise.tool().app_idle_observable” to force the dialog up the window of Renoise.
I use the code to show the dialog:
--------------------------------------------------------------------------------
-- SHOW_DIALOG
--------------------------------------------------------------------------------
function show_dialog()
if dialog and dialog.visible then dialog:show() return end -- Prevents duplicate of the floating window ( when reaching this, the dialog never was created before or was closed )
dialog = renoise.app():show_custom_dialog ( ' '.. tool_name .. ' v' .. tool_version .. ' by: ulneiz' , content , keyhandler )
renoise.app():show_status('GT16-Colors is charged... Enjoy the colors and control!')
end
renoise.tool().app_idle_observable:add_notifier(??????????????) <-------Is it possible to place the code (a function?) here to overlap the window of tool?
--autostart
renoise.tool().app_new_document_observable:add_notifier( function()
if prefs.autostart.value then
show_dialog()
end
end )
Renoise.tool (). App_idle_observable: add_notifier (???)
Is there any simple function to achieve this?