Page 1 of 1

Tooltips on geyser labels?

Posted: Fri Oct 27, 2017 2:46 pm
by Nyyrazzilyss
If need be I can fake it with :setOnEnter and :setOnLeave, however:

Is there any pre-existing functions in geyser to add tooltips display to labels?

Re: Tooltips on geyser labels?

Posted: Fri Oct 27, 2017 4:45 pm
by Vadi
I don't believe so.

Re: Tooltips on geyser labels?

Posted: Sat Oct 28, 2017 10:08 pm
by Nyyrazzilyss
Would there be any way to use QToolTip / stylesheets/ or CSS to force tooltip creation? I sortof got one working using window entry/exit + mouse position, but it's not as quick as it should be. In particular, when it comes to making it work with hover.

Re: Tooltips on geyser labels?

Posted: Sun Oct 29, 2017 7:04 am
by Vadi
Maybe, I've never tried. Tooltips don't need to follow the mouse though - just appear and stay static?

Re: Tooltips on geyser labels?

Posted: Sun Oct 29, 2017 2:38 pm
by Nyyrazzilyss
Just appear on hover / disappear on subsequent mouse movement, yeah.

Looking at the events, there appears to be sysWindowMousePressEvent, sysWindowMouseReleaseEvent. :setOnEnter and :setOnLeave tell me when I enter/or exit a label. getMousePosition() gives the current mouse xp, yp.

Maybe was there also an event created on mouse movement, not just button press?

I've -almost- faked tooltips now, I just need to reduce the sensitivity of it. Creating from :setOnEnter / mouse position -at that time- ended up being just a bit to sensitive (the mouse is still moving and hasn't quite stopped yet to shift in to 'hover')

(edit)

Think I figured out what combination of those commands will work:

Don't display the tooltip from :setOnEnter, just use that to start checking for hover from the mouse position after a half second. I do poll the mouse position every second (which should be accurate enough in regards to whether i'm in hover or not). Creating the tooltip right from :setOnEnter however was the mistake I made.

Re: Tooltips on geyser labels?

Posted: Sun Oct 29, 2017 3:23 pm
by Vadi
There is an event on mouse move - added in 3.1 or 3.2. I'm on mobile right now, can't link.

Re: Tooltips on geyser labels?

Posted: Wed Apr 15, 2020 3:58 pm
by Vadi
You can now add a tooltip out of the box: https://wiki.mudlet.org/w/Manual:Geyser ... to_a_label