importClass(Packages.plugins.tprovoost.scripteditor.uitools.userdialogs.Dialog)

dlg = new Dialog("My Dialog") // creation
dlg.addNumber("A number", 12)

// Combo Box with the array as choices, last value is the default
dlg.addChoice("A choice", ["Choice 1", "Choice 2", "Choice 3"], "Choice 2")

// Text Fields
dlg.addString("A String", "Hello world!")
dlg.addString("Another String", "Bye world!")

// A slider and the min / max / default values
dlg.addSlider("A slider", 0, 10, 5)

dlg.show()

res = dlg.getResult()
if (!res) throw "User canceled"

println(dlg.getNumber())
println(dlg.getChoice())
println(dlg.getString())
println(dlg.getString())
println(dlg.getNumber())