Reputation: 1418
I've added some user stats to the OSG stats handler. Unfortunately, the 'title' column does not seem to expand automatically based on the width of the added user stats names.
Is there a way I could change the width of the title column?
The issue it causes now is if the 'bar' for my user stat begins at 'zero', the bar will be drawn over the time, preventing the users from reading it.
In the image above, the vertical white hair line should come after SimFrameTime:113.67 so it can be read correctly when the bar fro the frame starts at 'zero'.
Upvotes: 0
Views: 68
Reputation: 846
The frame tick lines position are fixed in screen space, they do not take into account the text size.
See the implementation in file osgViewer/statsHandler.cpp - the first line is drawn at "_startBlock" which is hardcoded to 150 "units" in the ortho camera space.
You can either change that value in your copy of OSG or expose the value in the StatsHandler class interface and submit a patch if you want official osg to support this feature.
Upvotes: 1