#22 Add temp touch screen fix
This commit is contained in:
@@ -64,7 +64,8 @@ class PiCamUi:
|
||||
elif event.type == pygame.QUIT:
|
||||
events.append("pygameQuit")
|
||||
elif event.type == pygame.USEREVENT:
|
||||
if event.user_type == pygame_gui.UI_BUTTON_PRESSED:
|
||||
# Shoul be UI_BUTTON_PRESSED, but using on hover for now as having touch screen problems
|
||||
if event.user_type == pygame_gui.UI_BUTTON_ON_HOVERED:
|
||||
for element in self.uiElements:
|
||||
if event.ui_element == element.get("element"):
|
||||
events.append("{}Pressed".format(element.get("name")))
|
||||
|
||||
Reference in New Issue
Block a user