ulf.schroeter Posted January 30, 2013 Share Posted January 30, 2013 Problem We are using engine.visualizer.renderMessage2D/3D() for rendering interactive object multi-line text annotations while the user moves the mouse cusor over objects. At the moment text output is always centered on the specified anchor point. This is too restrictive. Unfortunately there is no engine.visualizer method for calculation the screen size/extent of the output text message which could be used to calculate an appropriate text offset in screen coordinates so the text can be positioned left/right/top/bottom aligned (or whatever) in relation to the mouse screen position. Proposal Addition of a simple function engine.visualizer.getMessageExtent() so users can calculate text offsets. Link to comment
frustum Posted February 22, 2013 Share Posted February 22, 2013 engine.visualizer.renderMessage() functions will receive an additional argument for text alignment: vec3(0,0,0) - center vec3(1,0,0) - right vec3(-1,0,0) - left vec3(0,1,0) - bottom vec3(0,-1,0) - top Link to comment
ulf.schroeter Posted February 23, 2013 Author Share Posted February 23, 2013 Yep, good solution. In the meantime I discovered WidgetCanvas text functionality with even more capabilities for text formating, background polygons etc.. Link to comment
Recommended Posts