hover/unhover on all UI

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
jack_norton
Lemma-Class Veteran
Posts: 4067
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

hover/unhover on all UI

#1 Post by jack_norton » Sat Jan 08, 2011 5:12 am

I think would be useful to have hover/unhover also for other UI beside buttons. For example I am adding now a ui.bar and I'd like to have an associated tooltip with it, but I cannot use the standard method because hover/unhover aren't available. The workaround would be to make a transparent overlay button ot the bar size but obviously this isn't a great way to do it :oops:
follow me on Image Image Image
computer games

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: hover/unhover on all UI

#2 Post by SleepKirby » Fri Jan 21, 2011 10:16 pm

I second this request. I was trying to make a Preferences screen where you can hover over a button or bar to make an explanation appear, but I only got it working for buttons.

Also, I tried something like the workaround you suggested, though I think I used an imagemap hotspot instead of a button. When I placed the hotspot over the bar, I could not click and drag the bar anymore.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: hover/unhover on all UI

#3 Post by PyTom » Fri Jan 21, 2011 10:25 pm

I've added this for bar. It will be in 6.12.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: hover/unhover on all UI

#4 Post by SleepKirby » Fri Jan 21, 2011 11:22 pm

Great, thank you!

I wonder if hover would be useful for other UI components as well (besides the buttons and bars). I can't think of any good examples though. And I'm not sure, but adding hover to components that take children (e.g. a Window) might complicate things if their children can also have hover actions.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: hover/unhover on all UI

#5 Post by PyTom » Sat Jan 22, 2011 12:21 am

There's a new feature in 6.12, hoverarea, which lets you run code when the mouse is in the area. Unlike a button, it doesn't interfere with the focus system. So that can probably help.

A window that has focus is just a button.

Potentially, a viewport would usefully interact with focus - but a viewport doesn't take focus now, so I don't want to add it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users