hackathon-dev #1

Merged
amy merged 101 commits from hackathon-dev into develop 2019-12-12 13:56:11 -07:00
Showing only changes of commit 8441949e3d - Show all commits

View File

@ -39,13 +39,13 @@ msg = {}
while upiwin.get_message(msg): while upiwin.get_message(msg):
if msg['message'] == upiwin.WM_TOUCHCLICK: if msg['message'] == upiwin.WM_TOUCHCLICK:
print("Click at {0},{1}".format(msg['attrs'][0], msg['attrs'][1]) print("Click at {0},{1}".format(msg['attrs'][0], msg['attrs'][1])
if point_in_rect(cmd1_rect, msg['attrs'][0], msg['attrs'][1]): if point_in_rect(cmd1_rect, msg['attrs'][0], msg['attrs'][1])):
print("Click command 1") print("Click command 1")
elif point_in_rect(cmd2_rect, msg['attrs'][0], msg['attrs'][1]): elif point_in_rect(cmd2_rect, msg['attrs'][0], msg['attrs'][1])):
print("Click command 2") print("Click command 2")
elif point_in_rect(cmd3_rect, msg['attrs'][0], msg['attrs'][1]): elif point_in_rect(cmd3_rect, msg['attrs'][0], msg['attrs'][1])):
print("Click command 3") print("Click command 3")
elif point_in_rect(cmd4_rect, msg['attrs'][0], msg['attrs'][1]): elif point_in_rect(cmd4_rect, msg['attrs'][0], msg['attrs'][1])):
print("Click command 4") print("Click command 4")
elif msg['message'] == upiwin.WM_HWBUTTONCLICK: elif msg['message'] == upiwin.WM_HWBUTTONCLICK:
if msg['attrs'][0] == 4: # Button 4 = Exit app if msg['attrs'][0] == 4: # Button 4 = Exit app