add search settings sample
This commit is contained in:
19
samples/search-settings-test.lua
Normal file
19
samples/search-settings-test.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-- type = "search"
|
||||||
|
|
||||||
|
settings_init = false
|
||||||
|
|
||||||
|
function on_search()
|
||||||
|
if not settings_init then
|
||||||
|
search:show_buttons{ "Set settings" }
|
||||||
|
else
|
||||||
|
search:show_buttons{ "Result #1", "Result #2" }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_click(idx)
|
||||||
|
if not settings_init then
|
||||||
|
settings:show_dialog()
|
||||||
|
else
|
||||||
|
-- main work
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user