Icons as mouse cursor
Closed this issue · 5 comments
Hi,
first of all, you have created a really cool lib, many thanks for that.
My question is, is there a easy way to convert any icon into a mouse cursor?
Cheers
As far as I can tell this requires a subclass of https://openjfx.io/javadoc/11/javafx.graphics/javafx/scene/Cursor.html that can work with Ikon
. There's no such class, yet. I hope that such class can be created, similar to https://openjfx.io/javadoc/11/javafx.graphics/javafx/scene/ImageCursor.html
Well the default constructor for javax.scene.Cursor
is package private which means no additional subclasses can be made at this time. 😡
That is a great pity. That would have been a really cool feature.
Maybe it will work sometime in the future, however, thank you.
Indeed, there's no direct path to render an Ikon as a Cursor. However there may be a workaround: print the graphics of a FontIcon into an Image, pass that image to an ImageCursor, et voilà!
I will give it a try. Thanks.