reorganization
This commit is contained in:
19
samples/buttons_with_state_sample.lua
Normal file
19
samples/buttons_with_state_sample.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
buttons = { "Disabled", "Disabled", "Disabled" }
|
||||
|
||||
function on_resume()
|
||||
redraw()
|
||||
end
|
||||
|
||||
function on_click(idx)
|
||||
if buttons[idx] == "Disabled" then
|
||||
buttons[idx] = "Enabled"
|
||||
else
|
||||
buttons[idx] = "Disabled"
|
||||
end
|
||||
|
||||
redraw()
|
||||
end
|
||||
|
||||
function redraw()
|
||||
ui:show_buttons(buttons)
|
||||
end
|
||||
Reference in New Issue
Block a user