Add profiles module docs and samples
This commit is contained in:
13
samples/profiles_sample1.lua
Normal file
13
samples/profiles_sample1.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
-- This sample lists current system profiles and allows to restore any of it
|
||||
|
||||
profs = {}
|
||||
|
||||
function on_resume()
|
||||
profs = profiles:list()
|
||||
ui:show_lines(profiles:list())
|
||||
end
|
||||
|
||||
function on_click(idx)
|
||||
ui:show_toast("Restoring...")
|
||||
profiles:restore(profs[idx])
|
||||
end
|
||||
Reference in New Issue
Block a user