Board index FlightGear Development Aircraft Cockpit development

format of osg display

Discussion about creating 2d and 3d cockpits.

format of osg display

Postby gkick » Tue Jun 27, 2017 5:42 pm

To display a property value on screen doing a shift click in the property box will result in a display like

wind-from-heading-deg = 150.034691323 (in a nice crisp white font)

nasal osg script will look the same
Now the question is- what is the syntax to display the same data with the same font and colour like this: (not using a hud)

Wind Heading: 150 degrees

Thanks for your thoughts
Posts: 106
Joined: Sun Jan 01, 2017 11:04 pm

Re: format of osg display

Postby Octal450 » Tue Jun 27, 2017 7:44 pm

Do you mean for OSGtext?
You can do this:
Code: Select all
      <type type="string">text-value</type>
      <format type="string">Wind Heading: %s Degrees</format>
      <truncate type="bool">false</truncate>
      <font type="string">helvetica_medium.txf</font>
      <draw-text type="bool">true</draw-text>
      <draw-alignment type="bool">false</draw-alignment>
      <draw-boundingbox type="bool">false</draw-boundingbox>
         <width type="int">64</width>
         <height type="int">64</height>

Kind Regards,
What I do: Flight Dynamics, Systems, Canvas Displays, Autoflight, FlyByWire, Cockpit Animations
Aircraft I currently develop: MD-11 (Mainly), Secret, A320-family (Quality over Quantity)

My GitHub|MD-11 and ITAF Dev Discord|Airbus Dev Discord
User avatar
Posts: 4709
Joined: Tue Oct 06, 2015 12:51 pm
Callsign: WTF411/Octal
Version: next
OS: Windows 7/10 x64

Return to Cockpit development

Who is online

Users browsing this forum: No registered users and 1 guest