diff --git a/Aircraft/c172p/Instruments/EGT/EGT.xml b/Aircraft/c172p/Instruments/EGT/EGT.xml index ea0bb1a8e..dd60547f6 100644 --- a/Aircraft/c172p/Instruments/EGT/EGT.xml +++ b/Aircraft/c172p/Instruments/EGT/EGT.xml @@ -32,12 +32,14 @@ material - egt + Needle + Bug + Face - sim/model/instrument-lighting/emission/red - sim/model/instrument-lighting/emission/green - sim/model/instrument-lighting/emission/blue - controls/lighting/instruments-norm + 1.0 + 0.2 + 0.0 + sim/model/material/instruments/factor diff --git a/Aircraft/c172p/c172-help.xml b/Aircraft/c172p/c172-help.xml index bf13aadac..996c18d27 100644 --- a/Aircraft/c172p/c172-help.xml +++ b/Aircraft/c172p/c172-help.xml @@ -4,6 +4,10 @@ Ctrl-c Panel hotspots and labels + + l/L + Increase/decrease panel lighting + _________Engine Start Checklist_________ Mixture: Rich diff --git a/Aircraft/c172p/c172p-set.xml b/Aircraft/c172p/c172p-set.xml index 88621ed1c..0b7e7e874 100644 --- a/Aircraft/c172p/c172p-set.xml +++ b/Aircraft/c172p/c172p-set.xml @@ -241,23 +241,47 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net - - - s - Toggle Starter Switch - - property-assign - /controls/switches/starter - 1 - - - - property-assign - /controls/switches/starter - 0 - - - + + + L + Decrease Panel lighting + + property-adjust + controls/lighting/instruments-norm + -0.1 + 0 + 1.0 + 0 + + + + l + Increase Panel lighting + + property-adjust + controls/lighting/instruments-norm + 0.1 + 0 + 1.0 + 0 + + + + s + Toggle Starter Switch + + property-assign + /controls/switches/starter + 1 + + + + property-assign + /controls/switches/starter + 0 + + + diff --git a/Docs/README.gui b/Docs/README.gui index 9faa9124a..ad0184943 100644 --- a/Docs/README.gui +++ b/Docs/README.gui @@ -160,9 +160,9 @@ properties, though they will ignore any that are not relevant: default - true if this is the default object for when the user presses the [RETURN] key. - hide - if set to true, hides the whole widget that it is used + visible - if set to false, hides the whole widget that it is used in, along with its children. There's no empty space reserved - for such widgets. The "hide" property can also be used to hide + for such widgets. The "visible" property can also be used to hide other XML groups from the layouter. Objects may appear nested within the top-level dialog or a "group" diff --git a/Effects/cloud.eff b/Effects/cloud.eff index bb6d3c31e..8ac147507 100644 --- a/Effects/cloud.eff +++ b/Effects/cloud.eff @@ -4,6 +4,9 @@ + + /sim/rendering/clouds3d-vis-range + @@ -63,6 +66,11 @@ sampler-2d 0 + + range + float + range + true diff --git a/Input/Joysticks/Saitek/Pro-Flight-Combat-Rudder-Pedals.xml b/Input/Joysticks/Saitek/Pro-Flight-Combat-Rudder-Pedals.xml new file mode 100644 index 000000000..f6b77c1ed --- /dev/null +++ b/Input/Joysticks/Saitek/Pro-Flight-Combat-Rudder-Pedals.xml @@ -0,0 +1,58 @@ + + + + + + + Saitek Pro Flight Combat Rudder Pedals + Saitek Saitek Pro Flight Combat Rudder Pedals + + + Brake left + + property-scale + /controls/gear/brake-left + 1.0 + 0.5 + + + + + Brake right + + property-scale + /controls/gear/brake-right + 1.0 + 0.5 + + + + + + 3 + 2 + 2 + + Rudder + + property-scale + /controls/flight/rudder + 1.0 + 0.0 + 2.0 + + + + diff --git a/Input/Joysticks/Saitek/Pro-Flight-Yoke.xml b/Input/Joysticks/Saitek/Pro-Flight-Yoke.xml index f64f7b4dc..b4d5ffd04 100644 --- a/Input/Joysticks/Saitek/Pro-Flight-Yoke.xml +++ b/Input/Joysticks/Saitek/Pro-Flight-Yoke.xml @@ -1,265 +1,301 @@ + + Copyright (C) 2008 Oliver Schroeder (fgfs(at)o-schroeder.de) + This file is released under the GPL license. + --> - Saitek Saitek Pro Flight Yoke - Saitek Pro Flight Yoke - - - Aileron - - property-scale - /controls/flight/aileron - true - - - - Elevator - - property-scale - /controls/flight/elevator - -1.0 - true - - - - - Throttle - - nasal - - - - - Prop Pitch - - nasal - - - - - Mixture - - nasal - - - - - - View Direction - - true - - property-adjust - /sim/current-view/goal-heading-offset-deg - 1.0 - - - - true - - property-adjust - /sim/current-view/goal-heading-offset-deg - -1.0 - - - - - - View Elevation - - true - - property-adjust - /sim/current-view/goal-pitch-offset-deg - 1.0 - - - - true - - property-adjust - /sim/current-view/goal-pitch-offset-deg - -1.0 - - - - - - - - - - - - - - - - - - - - - - + Saitek Saitek Pro Flight Yoke + Saitek Pro Flight Yoke + + + Aileron + + property-scale + /controls/flight/aileron + true + + + + Elevator + + property-scale + /controls/flight/elevator + -1.0 + true + + + + + Throttle + + nasal + + + + + + 3 + 4 + + Prop Pitch + + nasal + + + + + + 4 + 3 + + Mixture + + nasal + + + + + + + 5 + 6 + + View Direction + + true + + property-adjust + /sim/current-view/goal-heading-offset-deg + 1.0 + + + + true + + property-adjust + /sim/current-view/goal-heading-offset-deg + -1.0 + + + + + + 6 + + View Elevation + + true + + property-adjust + /sim/current-view/goal-pitch-offset-deg + 1.0 + + + + true + + property-adjust + /sim/current-view/goal-pitch-offset-deg + -1.0 + + + + + + 7 + + View Elevation + + true + + property-adjust + /sim/current-view/goal-pitch-offset-deg + -1.0 + + + + true + + property-adjust + /sim/current-view/goal-pitch-offset-deg + 1.0 + + + + + + + + + + + + + + + + + + + + + + diff --git a/Nasal/gui.nas b/Nasal/gui.nas index 511d664e9..debc7fba9 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -505,7 +505,7 @@ var OverlaySelector = { # selector.open(); # var FileSelector = { - new: func(callback, title, button, pattern = nil, dir = "", file = "", dotfiles = 0) { + new: func(callback, title, button, pattern = nil, dir = "", file = "", dotfiles = 0, show_files=1) { var name = "file-select-"; var data = props.globals.getNode("/sim/gui/dialogs/", 1); for (var i = 1; 1; i += 1) @@ -520,6 +520,7 @@ var FileSelector = { m.set_button(button); m.set_directory(dir); m.set_file(file); + m.set_show_files(show_files); m.set_dotfiles(dotfiles); m.set_pattern(pattern); m.cblistener = setlistener(data.getNode("path", 1), callback); @@ -530,6 +531,7 @@ var FileSelector = { set_button: func(button) { me.data.getNode("button", 1).setValue(button) }, set_directory: func(dir) { me.data.getNode("directory", 1).setValue(dir) }, set_file: func(file) { me.data.getNode("selection", 1).setValue(file) }, + set_show_files: func(show) { me.data.getNode("show-files", 1).setValue(show) }, set_dotfiles: func(dot) { me.data.getNode("dotfiles", 1).setBoolValue(dot) }, set_pattern: func(pattern) { me.data.removeChildren("pattern"); @@ -545,6 +547,14 @@ var FileSelector = { }, }; +## +# DirSelector - convenience "class" (indeed using a reconfigured FileSelector) +# +var DirSelector = { + new: func(callback, title, button, dir = "") { + return FileSelector.new(callback, title, button, nil, dir, "", 0, show_files=0); + } +}; ## # Save/load flight menu functions. @@ -573,6 +583,17 @@ var load_flight = func { load_flight_sel.open(); } +## +# Screen-shot directory menu function +# +var set_screenshotdir_sel = nil; +var set_screenshotdir = func { + if (set_screenshotdir_sel == nil) + set_screenshotdir_sel = gui.DirSelector.new( + func(result) { setprop("/sim/paths/screenshot-dir", result.getValue()); }, + "Select Screenshot Directory", "Ok", getprop("/sim/paths/screenshot-dir")); + set_screenshotdir_sel.open(); +} ## # Open property browser with given target path. diff --git a/Shaders/3dcloud.vert b/Shaders/3dcloud.vert index 6caaf7134..e69a4b7c5 100644 --- a/Shaders/3dcloud.vert +++ b/Shaders/3dcloud.vert @@ -3,6 +3,8 @@ varying float fogFactor; +uniform float range; // From /sim/rendering/clouds3d-vis-range + attribute vec3 usrAttr1; attribute vec3 usrAttr2; @@ -40,26 +42,30 @@ void main(void) // Determine a lighting normal based on the vertex position from the // center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker. float n = dot(normalize(-gl_LightSource[0].position.xyz), - normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Position.xyz,0.0)))); + normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z,0.0)))); // Determine the position - used for fog and shading calculations vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position); float fogCoord = abs(ecPosition.z); + + // Determine fractional height of vertex from 0 at the bottom, and 1 at mid-height. + // Used to determine shading. float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height); // Final position of the sprite gl_Position = gl_ModelViewProjectionMatrix * gl_Position; -// Determine the shading of the sprite based on its vertical position and position relative to the sun. + // Determine the shading of the sprite based on its vertical position and position relative to the sun. n = min(smoothstep(-0.5, 0.0, n), fract); -// Determine the shading based on a mixture from the backlight to the front + + // Determine the shading based on a mixture from the backlight to the front vec4 backlight = gl_LightSource[0].diffuse * shade; gl_FrontColor = mix(backlight, gl_LightSource[0].diffuse, n); gl_FrontColor += gl_FrontLightModelProduct.sceneColor; // As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out. - gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(15000.0, 20000.0, fogCoord)); + gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(range*0.8, range, fogCoord)); gl_BackColor = gl_FrontColor; // Fog doesn't affect clouds as much as other objects. diff --git a/gui/dialogs/file-select.xml b/gui/dialogs/file-select.xml index 845af2f5e..52c797d66 100644 --- a/gui/dialogs/file-select.xml +++ b/gui/dialogs/file-select.xml @@ -94,6 +94,13 @@ nasal + + + 1 + 1 + + + 4 23 @@ -428,4 +435,16 @@ true + + + + + + diff --git a/gui/menubar.xml b/gui/menubar.xml index cd8babbdf..e75a0715d 100644 --- a/gui/menubar.xml +++ b/gui/menubar.xml @@ -62,6 +62,13 @@ + + + + nasal + + +