Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Sorry to continue asking, but where is the virtual cursor receiving mouse input? I see it taking stick events and I see the sensitivity being applied in the stick event. Is the solution that I have to create an entire equivalent MouseEvent class? I apologize that I am clearly missing something crucial here, I apparently am not as good at Python as I previously thought. I've never really had to overwrite another event handler, and I was unclear if Renpy is using Pygame for the mouse handling.

The virtual cursor isn't receiving mouse input; it's mimicking the functionality of a mouse by navigating around an image (the cursor) that can be used to focus things. If you specifically want a mouse cursor that takes over the usual game's mouse events, it's probably going to need to sit on top of everything and eat pygame.MOUSEMOTION and MOUSEDOWN/UP events so that you can use those events to control your desired mouse functionality. Then, depending on how you have your system set up, you might send modified mouse events back to Ren'Py at your desired coordinates. You will probably need to send some kind of mouse event out to the rest of the UI for things like drag & drop and edgescrolling at minimum, as they're hardcoded to listen for the pygame mouse events.

Most of Ren'Py's code to handle mouse events is in renpy/display/core.py in the Interface class.