forked from fmarco/message-board-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.kv
101 lines (96 loc) · 2.65 KB
/
client.kv
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<MenuScreen>:
BoxLayout:
orientation: 'vertical'
Button:
id: 'login_btn'
text: 'Login'
on_press: root.goto()
Button:
text: 'Settings'
on_press: root.manager.current = 'settings'
<SettingsScreen>:
BoxLayout:
orientation: 'vertical'
Label:
text: 'Host:'
TextInput:
id: host
multiline: False
Label:
text: 'Port:'
TextInput:
id: port
multiline: False
Button:
text: 'Back to menu'
size_hint_y: None
height: '48dp'
on_press: root.save_config(host.text, port.text); root.manager.current = 'menu'
<CameraScreen>:
BoxLayout:
orientation: 'vertical'
Button:
text: 'Snapshot'
on_press: root.make_photo()
size_hint_y: None
height: '48dp'
Button:
id: back_button
text: 'Back'
size_hint_y: None
height: '48dp'
on_press: root.manager.current = 'messages'
<MessageScreen>:
BoxLayout:
orientation: 'vertical'
Button:
id: btn_send
text: 'Send'
size_hint_y: None
height: '48dp'
on_press: root.send_message(message_text.text); message_text.text=""
Button:
id: btn_makephoto
text: 'Photo'
size_hint_y: None
height: '48dp'
on_press: root.manager.current = 'photo'
TextInput:
id: message_text
multiline: True
Button:
text: 'Back to menu'
size_hint_y: None
height: '48dp'
on_press: root.manager.current = 'menu'
<LoginScreen>:
orientation: 'vertical'
GridLayout:
rows: 1
cols: 1
GridLayout:
rows: 3
cols: 2
Label:
text: 'Username:'
TextInput:
id: username
multiline: False
Label:
text: 'Password:'
TextInput:
id: password
password: True
multiline: False
Button:
id: send_button
text: 'Send'
size_hint_y: None
height: '48dp'
on_press: root.login(username.text, password.text)
Button:
id: back_button
text: 'Back to the menu'
size_hint_y: None
height: '48dp'
on_press: root.manager.current = 'menu'