[SOLVED] Skipping "text speed" display with LMB locks the mouse in LMB viewport

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
User avatar
Aureus
Veteran
Posts: 278
Joined: Sun Aug 06, 2017 4:49 am
Completed: The Tavern, Tales From Windy Meadow
Projects: Roadwarden
Organization: Moral Anxiety Studio
itch: moral-anxiety
Location: Breslau, Poland
Contact:

[SOLVED] Skipping "text speed" display with LMB locks the mouse in LMB viewport

#1 Post by Aureus »

Greetings!
I've got an issue with my game's very specific interaction:
if the game's text speed isn't immediate,
and the player uses LMB to speed up the display of the NVL text;
-> hovering over any selectable options, buttons, or imagebuttons doesn't highlight them, pressing them doesn't make them interact.
To make them hoverable / clickable, the player needs to click LMB anywhere on the screen. Then, the game responds to the mouse movements as intended.



The "problem" is here:
viewport_drag_start = [ 'mousedown_1' ],
viewport_drag_end = [ 'mouseup_1' ],

Since my NVL screen has a viewport inside it, pressing LMB to skip the text display makes the game lock the mouse in the viewport drag. I kind of need this viewport_drag to remain since it also helps me with the inventory and journal menus, and I don't really want to remove it from NVL as well. (and I don't have an option to remove the viewport from the NVL screen)

Any tips on how to solve this?
Last edited by Aureus on Wed Aug 10, 2022 1:38 pm, edited 1 time in total.
Tales From Windy Meadow - slice of life, pixel art Visual Novel set in a fantasy village. now available on Steam.

User avatar
Aureus
Veteran
Posts: 278
Joined: Sun Aug 06, 2017 4:49 am
Completed: The Tavern, Tales From Windy Meadow
Projects: Roadwarden
Organization: Moral Anxiety Studio
itch: moral-anxiety
Location: Breslau, Poland
Contact:

Re: Skipping "text speed" display with LMB locks the mouse in LMB viewport

#2 Post by Aureus »

Bump!
Tales From Windy Meadow - slice of life, pixel art Visual Novel set in a fantasy village. now available on Steam.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Skipping "text speed" display with LMB locks the mouse in LMB viewport

#3 Post by Alex »

Try to remove 'mouseup_1' from 'dismiss' - https://www.renpy.org/doc/html/keymap.html#keymap

User avatar
Aureus
Veteran
Posts: 278
Joined: Sun Aug 06, 2017 4:49 am
Completed: The Tavern, Tales From Windy Meadow
Projects: Roadwarden
Organization: Moral Anxiety Studio
itch: moral-anxiety
Location: Breslau, Poland
Contact:

Re: Skipping "text speed" display with LMB locks the mouse in LMB viewport

#4 Post by Aureus »

Fantastic, thank you!
Simply removing mouseup_1 was too much of a price (it removed an option to speed up the display at all, or to skip Fade), but so far it looks like replacing it with mousedown_1 both remains its purpose, and doesn't collide with the scrollbar!
I'll test the game thoroughly tomorrow, but so far it seems like you solved it!
Tales From Windy Meadow - slice of life, pixel art Visual Novel set in a fantasy village. now available on Steam.

Post Reply

Who is online

Users browsing this forum: Google [Bot]