[Python] Radial selection based menus for use as a multiple option selector in pygame

Discussão em 'Python' iniciado por Stack, Junho 30, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on an application in Python using the Pygame library, and was wondering if it were possible to create an event internally to call up a static radial menu from the mouse cursor (like a command wheel? I think that's the right term for it?). I'm currently trying to use a pygame.mouse.get_pressed() event to call up the menu but am unsure on how to build the menu as a pop-in interactable event. Currently the line of thought is to build a pygame.sprite() to contain the menu, but realistically this sprite would have to be a nested set of dictionaries to go through each sub-menu before hitting a base case to return back through and close the menu with the selected option now applied to the cursor.

    I may be overcomplicating things, but I want this to be as interactive as possible to store the variety of possible options I'd like it to hold. Any suggestions would be greatly appreciated!

    Continue reading...

Compartilhe esta Página