hackathon-dev #1
|
@ -39,13 +39,13 @@ msg = {}
|
|||
while upiwin.get_message(msg):
|
||||
if msg['message'] == upiwin.WM_TOUCHCLICK:
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
elif msg['message'] == upiwin.WM_HWBUTTONCLICK:
|
||||
if msg['attrs'][0] == 4: # Button 4 = Exit app
|
||||
|
|
Loading…
Reference in New Issue
Block a user