Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -0,0 +1,25 @@
|
|||
local ui = require "ui"
|
||||
math.randomseed(os.time())
|
||||
|
||||
local win = ui.Window("GUI component interaction", 320, 200)
|
||||
|
||||
local entry = ui.Entry(win, 0, 124, 40)
|
||||
entry.enabled = false
|
||||
|
||||
ui.Button(win, "Increment", 105, 90).onClick = function (self)
|
||||
entry.text = entry.text + 1
|
||||
end
|
||||
|
||||
ui.Button(win, "Random", 110, 130).onClick = function (self)
|
||||
if ui.confirm("Set the field to a random number?") == "yes" then
|
||||
entry.text = math.random(100)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
win:show()
|
||||
-- update the user interface until the user closes the Window
|
||||
repeat
|
||||
sleep(1)
|
||||
ui.update()
|
||||
until not win.visible
|
||||
Loading…
Add table
Add a link
Reference in a new issue