Update LuaDialog example script to include File/Folder selection
authorRobin Gareus <robin@gareus.org>
Thu, 8 Jun 2017 11:22:43 +0000 (13:22 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 8 Jun 2017 11:22:43 +0000 (13:22 +0200)
scripts/_dialog_test.lua

index 87156826a735ad5b7dbe5d86995a07886166a12f..cc02f82a466b20bc1754e8e14033f785da94d633 100644 (file)
@@ -76,7 +76,11 @@ function factory () return function ()
 
                { type = "heading", title = "Heading" },
 
-               { type = "number", key = "number", title = "Whatever",  min = 0, max = 10, step = 1, digits = 2 }
+               { type = "number", key = "number", title = "Whatever",  min = 0, max = 10, step = 1, digits = 2 },
+
+               { type = "file", key = "file", title = "Select a File",  path = ARDOUR.LuaAPI.build_filename (Session:path (), Session:name () .. ".ardour") },
+
+               { type = "folder", key = "folder", title = "Select a Folder",  path = Session:path() }
        }
 
        local od = LuaDialog.Dialog ("title", dialog_options)