diff --git a/Docs/README.3DClouds b/Docs/README.3DClouds index b8ebc2190..8bc6039d4 100644 --- a/Docs/README.3DClouds +++ b/Docs/README.3DClouds @@ -32,34 +32,41 @@ by a OpenGL Shader - a small program that is run on your graphics card. The cloud is defined by the following properties: - minimum width of the cloud in meters (default 500) - - maximum width of the cloud (default min-cloud-width-m) - - minimum height of the cloud (default min-cloud-width-m) - - maximum height of the cloud (default max-cloud-width-m) + - maximum width of the cloud (default min-cloud-width-m*1.5) + - minimum height of the cloud (default 400) + - maximum height of the cloud (default min-cloud-height-m*1.5) - texture file of sprites to use (default cl_cumulus.png) - number of cloud textures defined horizontally in the texture file (default 4) - number of cloud textures defined vertically in the texture file (default 4) + - whether to choose the vertical texture index based on + sprite height within the clouds (default false) - Number of sprite to generate for the cloud (default 20) - Light multiplier for sprites at the bottom of the cloud (default 1.0) - minimum width of the sprites used to create the cloud (default 200) - maximum width of the sprites used to create the cloud - (default min-sprite-width-m) + (default min-sprite-width-m*1.5) - minimum height of the spites used to create the cloud - (default min-sprite-width-m) + (default 150) - maximum height of the sprites used to create the cloud - (default max-sprite-height-m) + (default min-sprite-height-m*1.5) + - vertical scaling factor to apply to to the sprite after + billboarding. A small value would create a sprite that + looks squashed when viewed from the side. (default 1.0) + The texture to use for the sprites is defined in the tag. To allow some variation, you can create a texture file containing multiple sprites in a grid, and define the tags. The code decides which texture to use for a given sprite : randomly in the x-direction -and based on the altitude of the sprite within the cloud in the y-direction. -Therefore, you should put sprite textures you want to use for the bottom of -your cloud at the bottom of the texture file, and those you want to use for -the top of the cloud at the top of the texture file. +and based on the altitude of the sprite within the cloud in the y-direction +if is set. Therefore, you should put sprite textures +you want to use for the bottom of your cloud at the bottom of the texture +file, and those you want to use for the top of the cloud at the top of the +texture file. For example, the following Nasal snippet will create a cloud immediately above the aircraft at an altitude of 1000 ft above /environment/clouds/layer[0]/elevation-ft : @@ -92,14 +99,14 @@ Deleting Individual Clouds Clouds may be deleted by using the "del-cloud" command. This takes the following property arguments. - - The cloud layer number containing the cloud to delet. (default 0) + - The cloud layer number containing the cloud to delete. (default 0) - The unique identifier of the cloud to delete. Global 3D Clouds ================ -The global weather system uses sets of clouds defined in cloudlayers.xml -in your FG_ROOT. +The global weather system uses sets of clouds defined in +FG_ROOT/Environment/cloudlayers.xml The file has 3 distinct sections: layers, cloud boxes and clouds, described below. diff --git a/Input/Joysticks/ThrustMaster/Warthog/README b/Input/Joysticks/ThrustMaster/Warthog/README new file mode 100644 index 000000000..fc0e4d898 --- /dev/null +++ b/Input/Joysticks/ThrustMaster/Warthog/README @@ -0,0 +1,35 @@ +("Master files") Warthog-Stick.xml and Warthog-Throttle.xml support +configuration overlay files. These are optional and can be used to +modify the default configuration. Warthog-Stick.xml searches for +overlay files in + + {$FG_HOME,$FG_ROOT}/Input/Joysticks/ThrustMaster/Warthog/Stick/ + +and Warthog-Throttle.xml in + + {$FG_HOME,$FG_ROOT}/Input/Joysticks/ThrustMaster/Warthog/Throttle/ + + +Available files are loaded in the following order, where is replaced +by the contents of property "x": + + - generic.xml + - helicopter.xml (only helicopters) + - .xml (some aircraft set this property to "seaplane") + - .xml (not used by the system; meant to + be set on the command line or in wrapper scripts, + for example: --prop:input/joysticks/overlay=modern_jet) + - .xml (aircraft name, for example "harrier.xml") + + +If a file is found under $FG_HOME, then an equally named file under +$FG_ROOT will be ignored. + +Overlay files are like stripped down joystick driver files, but shall +not have a entry. They only need to define what should differ +from the already loaded joystick configuration. Make sure that an +axis definition uses the same index as the master file. The n-th + in an XML config file usually has index n, even if the axis +uses etc. Nasal blocks are properly executed in the +namespace of the master file, so you can access all its functions +and variables. diff --git a/Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml b/Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml new file mode 100644 index 000000000..c938dd19e --- /dev/null +++ b/Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + Right Throttle + throttle + + nasal + + + + + + Left Throttle + thrust vector + + nasal + + + + diff --git a/Input/Joysticks/ThrustMaster/Warthog/Throttle/helicopter.xml b/Input/Joysticks/ThrustMaster/Warthog/Throttle/helicopter.xml new file mode 100644 index 000000000..51cf49390 --- /dev/null +++ b/Input/Joysticks/ThrustMaster/Warthog/Throttle/helicopter.xml @@ -0,0 +1,13 @@ + + + + + Hat Switch Horizontal + adjust engine balance + + + + Hat Switch Vertical + adjust engine power + + diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml new file mode 100644 index 000000000..614cb4d44 --- /dev/null +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml @@ -0,0 +1,361 @@ + + + + + Thustmaster Joystick - HOTAS Warthog + + + nasal + + + + + X-axis + aileron + 0.00001 + + property-scale + /controls/flight/aileron + + + + + Y-axis + elevator + 0.00001 + + property-scale + /controls/flight/elevator + -1.0 + + + + + Trim Hat Switch Left/Right + adjust aileron trim, +mod: reset aileron trim + + true + + nasal + + + + + true + + nasal + + + + + + + Trim Hat Switch Down/Up + adjust elevator trim, +mod: reset elevator trim + + true + + nasal + + + + + true + + nasal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml new file mode 100644 index 000000000..3a81acb99 --- /dev/null +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml @@ -0,0 +1,472 @@ + + + + + Thrustmaster Throttle - HOTAS Warthog + + + nasal + + + + + Mouse Horizontal + + + + Mouse Vertical + + + + Right Throttle + right throttle + 0.00001 + + nasal + + + + + + Left Throttle + left throttle + + 3 + 3 + 5 + + 0.00001 + + nasal + + + + + + Friction Wheel + rudder trim + + 4 + 4 + 6 + + + property-scale + /controls/flight/rudder-trim + -1 + 2 + + + + + Hat Switch Horizontal + adjust mixture: left = leaner, right = fatter + + 5 + 5 + 3 + + + true + + nasal + + + + + true + + nasal + + + + + + + Hat Switch Vertical + adjust propeller pitch: forward = increase, backward = decrease + + 6 + 6 + 4 + + + true + + nasal + + + + + true + + nasal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Nasal/aircraft.nas b/Nasal/aircraft.nas index 7c88f8d3d..a8c2b08bc 100644 --- a/Nasal/aircraft.nas +++ b/Nasal/aircraft.nas @@ -846,7 +846,7 @@ var tyresmoke = { }, update: func { var rollspeed = me.get_rollspeed(); - var vert_speed = (me.vertical_speed) ? me.vertical_speed.getValue() : -999; + var vert_speed = (me.vertical_speed) != nil ? me.vertical_speed.getValue() : -999; var groundspeed = me.speed.getValue(); var friction_factor = me.friction_factor.getValue(); var wow = me.wow.getValue(); diff --git a/Nasal/gui.nas b/Nasal/gui.nas index debc7fba9..01f57bd28 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -411,24 +411,29 @@ var OverlaySelector = { m.sortprop = relpath(sortprop or nameprop); m.mpprop = mpprop; m.callback = callback; + m.title = title; + m.dialog_name = name; m.result = data.initNode("result", ""); m.listener = setlistener(m.result, func(n) m.select(n.getValue())); - - m.prop.getNode("group/text/label").setValue(title); - m.prop.getNode("group/button/binding/script").setValue('gui.Dialog.instance["' ~ name ~ '"].close()'); - m.list = m.prop.getNode("list"); - m.list.getNode("property").setValue(m.result.getPath()); - if (m.mpprop != nil) aircraft.data.add(m.nameprop); - - m.rescan(); - m.current = -1; - m.select(getprop(m.nameprop) or ""); + m.reinit(); + # need to reinit again, whenever the GUI is reloaded + m.reinit_listener = setlistener("/sim/signals/reinit-gui", func(n) m.reinit()); return m; }, + reinit: func { + me.prop.getNode("group/text/label").setValue(me.title); + me.prop.getNode("group/button/binding/script").setValue('gui.Dialog.instance["' ~ me.dialog_name ~ '"].close()'); + me.list = me.prop.getNode("list"); + me.list.getNode("property").setValue(me.result.getPath()); + me.rescan(); + me.current = -1; + me.select(getprop(me.nameprop) or ""); + }, del: func { removelistener(me.listener); + removelistener(me.reinit_listener); }, rescan: func { me.data = []; diff --git a/Startup/777-commercial.xml b/Startup/777-commercial.xml new file mode 100644 index 000000000..61271b99b --- /dev/null +++ b/Startup/777-commercial.xml @@ -0,0 +1,18 @@ + + + + + + + + 41 + gate + NONE + + + diff --git a/Startup/c172p.xml b/Startup/c172p.xml new file mode 100644 index 000000000..ef62e95ea --- /dev/null +++ b/Startup/c172p.xml @@ -0,0 +1,18 @@ + + + + + + + + 5 + ga + NONE + + + diff --git a/gui/dialogs/map.xml b/gui/dialogs/map.xml index d5aa0f975..c80efd179 100644 --- a/gui/dialogs/map.xml +++ b/gui/dialogs/map.xml @@ -182,16 +182,60 @@ command interface /autopilot/route-manager/input: - - - fill - fill + + vbox true - 400 - 600 - /gui/map - + + + + fill + fill + true + 400 + 600 + /gui/map + + + + + + hbox + + + + + + Zoom %d + /gui/map/zoom + true + + + + + +