Limiting mouse movement to the game viewport in fullscreen

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
nomocha12
Newbie
Posts: 4
Joined: Sun Mar 28, 2021 8:34 am
Contact:

Limiting mouse movement to the game viewport in fullscreen

#1 Post by nomocha12 »

I'm currently porting a game designed for 4:3 displays. The game scales nicely after switching to fullscreen, and since I'm using a 16:9 monitor, I see the expected letterbox black bands on the left and right sides. I can move the mouse outside of the "game viewport" (where the black bands are) and to my surprise, Ren'Py is responsive to mouse clicks out there, for showing the save menu or advancing the dialog. That isn't something desirable in my case. Added to that, I'm using a screen with a hotspot on the far left edge that displays a menu when it's hovered, and using it in fullscreen feels really uncomfortable.

Those are the reasons why I'd like to restrict the mouse movement to the "game viewport" during fullscreen mode, but I've not seen anything in the documentation. Any suggestions?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot]