Dynamic hovered picture

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
Mirrodin
Regular
Posts: 99
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

Dynamic hovered picture

#1 Post by Mirrodin » Sat Mar 28, 2020 10:55 am

Hi guys,

Long time,

Just asking if an dynamic hovered function exist, let's say my picture is big but there is just a part which isn't empty, is it possible to have the focus on the imagebutton only if the mouse is on this zone and not on the rest of the picture ?
Thanks !

User avatar
gas
Miko-Class Veteran
Posts: 686
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Dynamic hovered picture

#2 Post by gas » Sat Mar 28, 2020 11:18 am

You mean to activatethe focus only on the visible pixels? Set the focus_mask property.
https://www.renpy.org/dev-doc/html/styl ... focus_mask
10 ? "RENPY"
20 GOTO 10

RUN

Post Reply

Who is online

Users browsing this forum: Google [Bot]