Closed jswift-stfc closed 2 years ago
Yes, but I think it would be wise to provide a couple of different options for this:
1) Display in an external widget - this requires us to offer a signal
containing the 2D coordinate of the mouse, and it's up to the developer to provide a widget and connect up to the signal.
2) Display within our widget - we can display the 2D coordinates on our own widget, at one corner of the display.
3) Display near to the mouse pointer - we can display the 2D coordinates "attached" to the mouse.
Yes, I'd say that is definitely the way to go about this.
Regarding displaying near the mouse pointer - do you think that's as simple as maintaining a TextEntity
, storing the 2D coordinate, and anchoring in at the mouse position, as it is moved?
Seems like a perfectly reasonable solution to me. You'll have to map the mouse coordinate to a 3D position to anchor the label at - the screenToAxes2D()
function introduced recently will help.
I was eying that function up!
It could be a good idea to display somewhere the cartesian coordinates of the mouse in the frame, i.e. show the current "value" that the mouse is hovered on?