disco debugging the script

This commit is contained in:
Amy Bowersox 2019-12-11 12:19:48 -07:00
parent acc7aacf7b
commit 1ea7a740fe

View File

@ -38,6 +38,7 @@ hdc.rectangle(cmd4_rect[0], cmd4_rect[1], cmd4_rect[2], cmd4_rect[3])
msg = {} 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])
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]):