added "click" events for both buttons and touch
This commit is contained in:
@@ -25,6 +25,8 @@ while upiwin.get_message(msg):
|
||||
print("Button {0} was pressed.".format(msg['attrs'][0]))
|
||||
elif msg['message'] == upiwin.WM_HWBUTTONUP:
|
||||
print("Button {0} was released.".format(msg['attrs'][0]))
|
||||
elif msg['message'] == upiwin.WM_HWBUTTONCLICK:
|
||||
print("Button {0} was clicked.".format(msg['attrs'][0]))
|
||||
bn = msg['attrs'][0]
|
||||
if bn == 1:
|
||||
print("Backlight ON.")
|
||||
@@ -41,3 +43,5 @@ while upiwin.get_message(msg):
|
||||
log_touch('MOVE', msg['attrs'][0], msg['attrs'][1])
|
||||
elif msg['message'] == upiwin.WM_TOUCHUP:
|
||||
log_touch('UP', msg['attrs'][0], msg['attrs'][1])
|
||||
elif msg['message'] == upiwin.WM_TOUCHCLICK:
|
||||
log_touch('CLICK', msg['attrs'][0], msg['attrs'][1])
|
||||
|
||||
Reference in New Issue
Block a user