Page 1 of 1
hover/unhover on all UI
Posted: Sat Jan 08, 2011 5:12 am
by jack_norton
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

Re: hover/unhover on all UI
Posted: Fri Jan 21, 2011 10:16 pm
by SleepKirby
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.
Re: hover/unhover on all UI
Posted: Fri Jan 21, 2011 10:25 pm
by PyTom
I've added this for bar. It will be in 6.12.
Re: hover/unhover on all UI
Posted: Fri Jan 21, 2011 11:22 pm
by SleepKirby
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.
Re: hover/unhover on all UI
Posted: Sat Jan 22, 2011 12:21 am
by PyTom
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.