From b98a091e0be6b9aad18e498560a97855dbecdde1 Mon Sep 17 00:00:00 2001 From: Durk Talsma Date: Sun, 21 Aug 2011 14:28:36 +0200 Subject: [PATCH 01/10] Fix axis bindings for windows. Make compatible with windows. --- Input/Joysticks/Saitek/Pro-Flight-Yoke.xml | 558 +++++++++++---------- 1 file changed, 297 insertions(+), 261 deletions(-) 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 + + + + + + + + + + + + + + + + + + + + + + From 8e7d7012ce68c0a8823a3abbc6b002f9e2b5017e Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 21 Aug 2011 15:00:45 +0200 Subject: [PATCH 02/10] Directory dialog New directory dialog - just an option for the existing file dialog really. --- Nasal/gui.nas | 12 +++++++++++- gui/dialogs/file-select.xml | 24 +++++++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Nasal/gui.nas b/Nasal/gui.nas index 511d664e9..bb15dd82d 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. 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 + +