From 09be8cb579c0fcfc13422d362aa12427f44362d5 Mon Sep 17 00:00:00 2001 From: ehofman <ehofman> Date: Fri, 28 Jan 2005 15:17:30 +0000 Subject: [PATCH] Melchior FRANZ: I hope Roy doesn't mind that I'm submitting his patch again. I only removed the limits, because they didn't work in several aircraft. This allows you to do unrealistic things like sticking your head out of a 747 cockpit, or "extreme" things like leaving the aircraft, but that's no worse than being able to turn the head several times in a row as in "The Exorcist". * Roy Vegard Ovesen: I've attached a patch to mice.xml that lets you move the camera/viewport with the middle mouse button pressed in mouse view mode. Useful for looking at the compass head on. --- mice.xml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/mice.xml b/mice.xml index 014839b3c..ed1ee36b5 100644 --- a/mice.xml +++ b/mice.xml @@ -208,7 +208,7 @@ current mode for each mouse is held in the <!-- Mouse left/right motion --> <x-axis> - <!-- No buttons pressed: move the view position left or right --> + <!-- No buttons pressed: rotate the view left or right --> <binding> <condition> <and> @@ -228,6 +228,23 @@ current mode for each mouse is held in the <wrap type="bool">true</wrap> </binding> + + <!-- Middle button pressed: move the view position left or right --> + <binding> + <condition> + <and> + <not> + <property>/devices/status/mice/mouse[0]/button[0]</property> + </not> + <property>/devices/status/mice/mouse[0]/button[1]</property> + </and> + </condition> + <command>property-adjust</command> + <property>/sim/current-view/x-offset-m</property> + <factor type="double">1</factor> + <wrap type="bool">false</wrap> + </binding> + </x-axis> <!-- Mouse up/down motion --> @@ -252,6 +269,23 @@ current mode for each mouse is held in the <max type="double">90</max> <wrap type="bool">false</wrap> </binding> + + <!-- Middle button pressed: move the view up and down --> + <binding> + <condition> + <and> + <not> + <property>/devices/status/mice/mouse[0]/button[0]</property> + </not> + <property>/devices/status/mice/mouse[0]/button[1]</property> + </and> + </condition> + <command>property-adjust</command> + <property>/sim/current-view/y-offset-m</property> + <factor type="double">-1</factor> + <wrap type="bool">false</wrap> + </binding> + </y-axis> </mode>