aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelinput.cpp')
-rw-r--r--linden/indra/newview/llpanelinput.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/linden/indra/newview/llpanelinput.cpp b/linden/indra/newview/llpanelinput.cpp
index 32c4af3..9664b6f 100644
--- a/linden/indra/newview/llpanelinput.cpp
+++ b/linden/indra/newview/llpanelinput.cpp
@@ -31,7 +31,10 @@
31 */ 31 */
32 32
33#include "llviewerprecompiledheaders.h" 33#include "llviewerprecompiledheaders.h"
34
34#include "llpanelinput.h" 35#include "llpanelinput.h"
36
37#include "llcombobox.h"
35#include "lluictrlfactory.h" 38#include "lluictrlfactory.h"
36#include "llviewercamera.h" 39#include "llviewercamera.h"
37#include "llviewercontrol.h" 40#include "llviewercontrol.h"
@@ -60,7 +63,6 @@ BOOL LLPanelInput::postBuild()
60 mPreAdjustCameraOffsetScale = gSavedSettings.getF32("CameraOffsetScale"); 63 mPreAdjustCameraOffsetScale = gSavedSettings.getF32("CameraOffsetScale");
61 64
62 childSetValue("mouse_sensitivity", gSavedSettings.getF32("MouseSensitivity")); 65 childSetValue("mouse_sensitivity", gSavedSettings.getF32("MouseSensitivity"));
63 childSetValue("automatic_fly", gSavedSettings.getBOOL("AutomaticFly"));
64 childSetValue("invert_mouse", gSavedSettings.getBOOL("InvertMouse")); 66 childSetValue("invert_mouse", gSavedSettings.getBOOL("InvertMouse"));
65 childSetValue("edit_camera_movement", gSavedSettings.getBOOL("EditCameraMovement")); 67 childSetValue("edit_camera_movement", gSavedSettings.getBOOL("EditCameraMovement"));
66 childSetValue("appearance_camera_movement", gSavedSettings.getBOOL("AppearanceCameraMovement")); 68 childSetValue("appearance_camera_movement", gSavedSettings.getBOOL("AppearanceCameraMovement"));
@@ -75,6 +77,7 @@ BOOL LLPanelInput::postBuild()
75 fov_slider->setValue(LLViewerCamera::getInstance()->getView()); 77 fov_slider->setValue(LLViewerCamera::getInstance()->getView());
76 78
77 childSetValue("double_click_action", gSavedSettings.getString("DoubleClickAction")); 79 childSetValue("double_click_action", gSavedSettings.getString("DoubleClickAction"));
80 childSetCommitCallback("double_click_action", onCommitAction, this);
78 childSetValue("go_action", gSavedSettings.getString("GoAction")); 81 childSetValue("go_action", gSavedSettings.getString("GoAction"));
79 82
80 childSetValue("Disable camera constraints", gSavedSettings.getBOOL("DisableCameraConstraints")); 83 childSetValue("Disable camera constraints", gSavedSettings.getBOOL("DisableCameraConstraints"));
@@ -95,7 +98,6 @@ void LLPanelInput::apply()
95 mPreAdjustCameraOffsetScale = childGetValue("camera_offset_scale").asReal(); 98 mPreAdjustCameraOffsetScale = childGetValue("camera_offset_scale").asReal();
96 99
97 gSavedSettings.setF32("MouseSensitivity", childGetValue("mouse_sensitivity").asReal()); 100 gSavedSettings.setF32("MouseSensitivity", childGetValue("mouse_sensitivity").asReal());
98 gSavedSettings.setBOOL("AutomaticFly", childGetValue("automatic_fly"));
99 gSavedSettings.setBOOL("InvertMouse", childGetValue("invert_mouse")); 101 gSavedSettings.setBOOL("InvertMouse", childGetValue("invert_mouse"));
100 gSavedSettings.setBOOL("EditCameraMovement", childGetValue("edit_camera_movement")); 102 gSavedSettings.setBOOL("EditCameraMovement", childGetValue("edit_camera_movement"));
101 gSavedSettings.setBOOL("AppearanceCameraMovement", childGetValue("appearance_camera_movement")); 103 gSavedSettings.setBOOL("AppearanceCameraMovement", childGetValue("appearance_camera_movement"));
@@ -130,3 +132,14 @@ void LLPanelInput::onClickJoystickSetup(void* user_data)
130 } 132 }
131} 133}
132 134
135// static
136void LLPanelInput::onCommitAction(LLUICtrl* ctrl, void* user_data)
137{
138 LLPanelInput* self = (LLPanelInput*)user_data;
139 LLComboBox* combo = (LLComboBox*)ctrl;
140 if (self && combo)
141 {
142 self->childSetEnabled("go_action_label", combo->getSimple() == "Go");
143 self->childSetEnabled("go_action", combo->getSimple() == "Go");
144 }
145}