On 24 Jul 2012, at 16:45, Thomas Geymayer wrote:

> I have just experimented a bit with osgText and multi-line text. So far
> I didn't notice any problems.

My concern was about calculating sane vertical heights allowing for line-wrap, 
but that appears to work, based on your demo below!

> But using the Canvas also for the GUI would give us the advantage of a
> unified rendering backend for any type of GUI/text rendering and also
> the ability to use the same widgets everywhere - eg. use them also
> inside aircrafts for CDU GUIs or other displays...
> 
> I've done a quick proof of concept for a tabbed and scrollable widget
> (including some UTF-8 chars):

That's quite a convincing demo :)

Especially since we'd factor the createXYZ functions into a helper, or even 
C++, depending on how much customisability we're looking for.

I'm even more convinced now that we should move the 2D panel and HUD rendering 
over to this approach, since that would get rid of all the legacy OpenGL code 
besides the GUI.

Thomas, one issue I can guess at (though PLIB is also really bad at it, and 
osgWidget is not much better!) - text selection. Do you think you'd be able to 
handle a blinking insertion point and a standard draggable text selection area 
in this approach? Obviously it might need some additional C++ helpers but 
that's okay since text-editing is a pretty specialised behaviour.

One goal of mine for the GUI is to get platform native copy-and-paste working, 
BTW ;)

Stefan, what's your opinion? Obviously Thomas knows the Canvas code since he 
created it - I've looked at the source but not used it properly (and probably 
no-one else has a chance to either, yet), but it has the advantage that it's 
already checked in, and offers a very lightweight solution potentially. (We 
could could allow aircraft dialogs to include custom widgets, although that 
might be unwise for other reasons)

James

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to