Aircraft dialogs: Difference between revisions

Line 31: Line 31:
== Status ==
== Status ==
Anyway, Thorsten has started to roll out a few designs of his own and tries to keep the tools fairly general so that they can be re-used by others- so here's the revised version of the Shuttle propellant dialog.
Anyway, Thorsten has started to roll out a few designs of his own and tries to keep the tools fairly general so that they can be re-used by others- so here's the revised version of the Shuttle propellant dialog.


[[File:Propellant dlg02.jpg|thumb|right|an example of the detail dialog which allows to set levels of fuel and oxidizer separately (and the overview dialog shows the usable propellant then, i.e. the minimum of the two) - for aircraft, this would be somewhat simpler.]]
[[File:Propellant dlg02.jpg|thumb|right|an example of the detail dialog which allows to set levels of fuel and oxidizer separately (and the overview dialog shows the usable propellant then, i.e. the minimum of the two) - for aircraft, this would be somewhat simpler.]]
Basically all that needs to be done is:
* one line to declare the widget
* one line to place it
* one line to attach context help to it
* and have a support structure to update the values and define the context help strings
This might be a good time to gather ideas for features - what do you think e.g. the box to display a text/property value should be able to do automatically?<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=326951#p326951
  |title  =  <nowiki> Re: Aircraft-specific dialogs </nowiki>
  |author =  <nowiki> Thorsten </nowiki>
  |date  =  Jan 27th, 2018
  |added  =  Jan 27th, 2018
  |script_version = 0.36
  }}</ref>


The general idea is to use semi-transparent 'content gauges' on a background raster image to show where the tank is located and how full it currently is - double-clicking any tank will bring up a detail window which allows to set the content (here propellant and oxidier separately, this is rocket fuel...) and also shows the current tank pressures and temperatures.
The general idea is to use semi-transparent 'content gauges' on a background raster image to show where the tank is located and how full it currently is - double-clicking any tank will bring up a detail window which allows to set the content (here propellant and oxidier separately, this is rocket fuel...) and also shows the current tank pressures and temperatures.
Line 46: Line 64:
   |script_version = 0.36  
   |script_version = 0.36  
   }}</ref>
   }}</ref>
If anyone wants to follow the development or use the code, it's here:
 
https://sourceforge.net/p/fgspaceshuttledev/code/ci/development/tree/Nasal/canvas/canvas_dialogs.nas
If anyone wants to follow the development or use the code, it's here: https://sourceforge.net/p/fgspaceshuttledev/code/ci/development/tree/Nasal/canvas/


== SVG based ==
== SVG based ==