-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.lua
More file actions
71 lines (65 loc) · 2.21 KB
/
Main.lua
File metadata and controls
71 lines (65 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
-- Main.lua
function setup()
local schema = {
title = "Bluetooth",
backButton = {
text = "General",
callback = function() print("Pressed back") end
},
elems = {
{type="block",elems = {
{type="SimpleArrow", text = "About", callback = function() print("HI") end },
{type="SimpleArrow", text = "Software Update",rightText="Nice one!"},
{type="SimpleArrow", text = "Usage", rightText = "Two"},
}},
{type="blank",amount=30},
{type="selector",elems={
{text="Rui"},
{text="Juli",tag="juli"},
{text="Conor"}
}},
{type="blank",amount=30},
{type="MultiTextInput", lines = 5},
{type="blank",amount=30},
{type="text",text="Now Discovereable"},
{type="blank",amount=5},
{type="block",elems = {
{type="TextInput", label = "username",shadowText="he-man"},
{type="TextInput", label = "nickname"},
{type="SimpleArrow", text = "Sounds",tag="temp"},
}},
{type="blank",amount=30},
{type="block",elems = {
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
{type="SimpleArrow", text = "Sounds"},
}},
}
}
p = AppleScreen(schema)
p.taggedElems.temp:showHourGlass(true)
--p.taggedElems.temp:setColors(color(255,0,0),color(255,0,0))
end
function draw()
background(0)
smooth()
p:draw()
end
function touched(t)
p:touched(t)
if GLOBAL_SHOWKEYBOARD then
GLOBAL_SHOWKEYBOARD = nil
showKeyboard()
end
end
function keyboard(key)
--print("keyboard!")
p:keyboard(key)
end