PDA

View Full Version : Mouse behavior



bzjeurd
August 18th, 2012, 22:06
Hello,

Is it possible to modify the mouse cursor when hovering a windowcontrol?

The current behavior change the mouse icon from pointer to hand when dragging is enable... but I can't found where these icons are set.

Any idea?

Thanks in advance for any help

Zeus
August 18th, 2012, 22:56
For window controls you can use the setHoverCursor(cursor name) method to change the cursor image when a control is hovered over. Where cursor name is the type of cursor required. The method only supports two cursor types, parameter options are "arrow" and "hand".

beyond the default two options, I don't believe its currently possible to define a custom cursor - although thinking about it it would be a nice touch to be able to define multiple cursor types.

bzjeurd
August 19th, 2012, 02:19
Thanks for your help.

Interesting, this method is not documented on the online library.
Is there a more complete reference documentation somewhere ?

Yop, it would be nice that the mouse pointer customization comes as new feature in future releases.

Zeus
August 19th, 2012, 11:06
Thanks for your help.

Interesting, this method is not documented on the online library.
Is there a more complete reference documentation somewhere ?

Yop, it would be nice that the mouse pointer customization comes as new feature in future releases.

Your welcome.

It is documented; see the windowcontrol link under Elements.
https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setHoverCursor

gmkieran
August 20th, 2012, 17:07
I'm not a coder so this is mostly for my curiosity, but it doesn't make sense to me that SetHoverCursor() would be limited to 2 options. Isn't "cursor name" simply a pointer to a graphic that is then used to replace the standard cursor graphic? I would think it should be possible to save additional graphics in whatever location "arrow" and "hand" are stored at and point SetHoverCursor() at those files. What did I miss?

Cheers!
GMK

Moon Wizard
August 20th, 2012, 22:53
Actually, cursors are actually a unique file type in windows, because they are a combination of graphic file and "hot spot". It would take completely new functionality to implement custom cursor support.

If you would like to see this option, please add to the wish list in my sig.

Cheers,
JPG