#22 Add temp touch screen fix

This commit is contained in:
James Hodgson
2022-10-07 14:42:20 +01:00
parent 783eff7636
commit 97dbf64668

View File

@@ -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")))