scenerygraphics / scenery

Flexible VR Visualisation for Volumetric and Geometric Data on the Java VM, powered by Kotlin and Vulkan.
https://scenery.graphics
GNU Lesser General Public License v3.0
131 stars 32 forks source link

Allow to center camera messages #775

Closed smlpt closed 2 months ago

smlpt commented 3 months ago

This adds a new centering parameter to Camera.showMessage() (default = false) that attempts to center the text based on message length (bounding boxes are not available for textboards, so can't use those). The scaling factor is a bit eyeballed, but it seems to work for the text sizes I currently use.