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?
Tooltips on geyser labels?
Re: Tooltips on geyser labels?
I don't believe so.
-
- Posts: 334
- Joined: Thu Mar 05, 2015 2:53 am
Re: Tooltips on geyser labels?
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?
Maybe, I've never tried. Tooltips don't need to follow the mouse though - just appear and stay static?
-
- Posts: 334
- Joined: Thu Mar 05, 2015 2:53 am
Re: Tooltips on geyser labels?
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.
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?
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?
You can now add a tooltip out of the box: https://wiki.mudlet.org/w/Manual:Geyser ... to_a_label