onMouseOver (done)

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
iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

onMouseOver (done)

#1 Post by iichan_lolbot »

I've managed to create an imagebutton toolbar at the top of the window, and it can be shown/hidden by a keyboard button or another imagebutton. But still I want to implement further improvements. Main of them is showing/hiding toolbar depending on the mouse position.

Is it possible to create smth (an invisible Displayable?), that will get events every 1/N second, not after each interact end?
Last edited by iichan_lolbot on Tue Dec 30, 2008 4:32 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: onMouseOver

#2 Post by PyTom »

You'd have to use a user-defined displayable for this. Those will get MOUSEMOTION events whenever the mouse moves.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: onMouseOver

#3 Post by iichan_lolbot »

Okay, I'l try it. Also I think of publishing WidgetBar class to Cookbook, when it ready.

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: onMouseOver

#4 Post by iichan_lolbot »

THX! It works!!!!!!!!!!!!111one
The strangiest thing is that I've done absolutely the same things twice before, each time it didn't work properly. Maybe I forgot to call renpy.restart_interaction() or smth...

PS Sorry for bothering

Post Reply

Who is online

Users browsing this forum: bloodzy