Disabling viewport edge scroll temporarily?

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
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

Disabling viewport edge scroll temporarily?

#1 Post by Evildumdum »

So i have a nice big viewport showing my battle map. At the bottom left corner of the viewport, the various attacks a unit can make is displayed. My problem is however that when the player hovers a button, even though it is imposed over the viewport (and not inside the viewport: block), the edge scroll still activates and meanders down the map while the player is looking at the attack details.

Is there any way of disabling edge scroll temporarily upon hover of a button?
"If at first you don't succeed, try hitting it with a shoe."

User avatar
papiersam
Veteran
Posts: 231
Joined: Fri Aug 12, 2016 2:24 pm
Completed: Gem Hunt Beta, 1/Probably, Animunch
Projects: The Panda Who Dreamed
Contact:

Re: Disabling viewport edge scroll temporarily?

#2 Post by papiersam »

I'm just guessing here, but would

Code: Select all

if not button_var:
    edgescroll 350, 20
work, given that button_var is true when the command buttons at the bottom are shown?

User avatar
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

Re: Disabling viewport edge scroll temporarily?

#3 Post by Evildumdum »

It works, thanks
"If at first you don't succeed, try hitting it with a shoe."

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]