Board index FlightGear Development Canvas

API documentation for canvas

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

API documentation for canvas

Postby wlbragg » Fri Apr 05, 2019 7:21 pm

Is there an API doc for canvas. where?

I'm also in need for information about formating numerical text. Is there a way to format it, for example something like...
.setFormat("%3.0f");

ah, I think I just found it...
.setText(sprintf("%4.0f", 100.0 * getprop("/fdm/jsbsim/systems/apu/apu/apu-rpm-fraction"))

is this the best way?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: API documentation for canvas

Postby Thorsten » Fri Apr 05, 2019 7:57 pm

Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 3 guests