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,
Waste of time. Goodbye forever.
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Return to Cockpit development

Who is online

Users browsing this forum: AndersG and 2 guests