Mar-12-2023, 01:55 PM
(This post was last modified: Mar-13-2023, 04:54 PM by deanhystad.)
Forget about the menu and focus on getting events from the controller. Can you do that? Can you see controller button presses?
import pygame def pgprint(text): text = f"{text}::{pygame.joystick.get_count()}" surface = font.render(text, True, "black") x = (700 - surface.get_width()) // 2 y = (100 - surface.get_height()) // 2 screen.fill("white") screen.blit(surface, (x, y)) pygame.display.update() pygame.init() screen = pygame.display.set_mode((700, 100)) font = pygame.font.Font(None, 16) running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False pgprint(str(event)) pygame.quit()