ec130-help-config-dialog.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0"?>
  2. <!-- Eurocopter EC 130 Helicopter by Heiko Schulz, Michael Habarta
  3. This file is part of FlightGear, the free flight simulator
  4. http://www.flightgear.org/
  5. Copyright (C) 2009 Heiko Schulz, Heiko.H.Schulz@gmx.net
  6. (C) 2016 Michael Habarta, mhabarta@freenet.de
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version.
  11. This program is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. General Public License for more details.
  15. -->
  16. <PropertyList>
  17. <name>Help</name>
  18. <layout>vbox</layout>
  19. <resizable>false</resizable>
  20. <modal>false</modal>
  21. <draggable>true</draggable>
  22. <default-padding>3</default-padding>
  23. <nasal>
  24. <open>
  25. var filename = getprop("/sim/aircraft-dir") ~ "/Dialogs/ec130-help-text-config.txt";
  26. setprop("/sim/model/ec130/help-text-config", io.readfile(filename));
  27. <!-- set title -->
  28. if ( getprop("/sim/model/variant") == "1" ) {
  29. setprop("/sim/gui/dialogs/ec130/help_config/dialog/group/text/label", "EC130-B4 Help Configuration");
  30. } else {
  31. setprop("/sim/gui/dialogs/ec130/help_config/dialog/group/text/label", " H130 Help Configuration");
  32. }
  33. </open>
  34. <close># just kept for educational purposes :-)</close>
  35. </nasal>
  36. <!-- Title with Esc knob for closing -->
  37. <group>
  38. <layout>hbox</layout>
  39. <empty><stretch>1</stretch></empty>
  40. <!-- title is set through nasal script above -->
  41. <text>
  42. <label>x</label>
  43. </text>
  44. <empty><stretch>true</stretch></empty>
  45. <button>
  46. <legend></legend>
  47. <keynum>27</keynum>
  48. <pref-width>16</pref-width>
  49. <pref-height>16</pref-height>
  50. <binding>
  51. <command>nasal</command>
  52. <script>
  53. ec130.help_config_dialog.toggle();
  54. ec130.config_dialog.toggle();
  55. </script>
  56. </binding>
  57. </button>
  58. </group>
  59. <hrule/>
  60. <group>
  61. <layout>table</layout>
  62. <default-padding>5</default-padding>
  63. <halign>center</halign>
  64. <!-- only to get a gap between left border and checkbox -->
  65. <text>
  66. <row>0</row>
  67. <col>0</col>
  68. <label></label>
  69. <halign>left</halign>
  70. </text>
  71. <textbox>
  72. <row>0</row>
  73. <col>1</col>
  74. <!-- dimensions -->
  75. <stretch>true</stretch>
  76. <pref-width>800</pref-width>
  77. <pref-height>550</pref-height>
  78. <halign>fill</halign>
  79. <valign>fill</valign>
  80. <property>/sim/model/ec130/help-text-config</property>
  81. <slider>20</slider>
  82. <wrap>false</wrap>
  83. <top-line>0</top-line>
  84. <editable>false</editable>
  85. </textbox>
  86. </group>
  87. <hrule/>
  88. <group>
  89. <layout>hbox</layout>
  90. <default-padding>3</default-padding>
  91. <button>
  92. <legend>Back</legend>
  93. <equal>true</equal>
  94. <keynum>27</keynum>
  95. <default>true</default>
  96. <binding>
  97. <command>nasal</command>
  98. <script>
  99. ec130.help_config_dialog.toggle();
  100. ec130.config_dialog.toggle();
  101. </script>
  102. </binding>
  103. </button>
  104. </group>
  105. </PropertyList>