aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelinput.cpp87
1 files changed, 21 insertions, 66 deletions
diff --git a/linden/indra/newview/llpanelinput.cpp b/linden/indra/newview/llpanelinput.cpp
index 7034b1c..026dd71 100644
--- a/linden/indra/newview/llpanelinput.cpp
+++ b/linden/indra/newview/llpanelinput.cpp
@@ -30,46 +30,10 @@
30 */ 30 */
31 31
32#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
33
34#include "llpanelinput.h" 33#include "llpanelinput.h"
35
36// linden library includes
37#include "llerror.h"
38#include "llrect.h"
39#include "llfontgl.h"
40#include "message.h"
41#include "lluictrlfactory.h" 34#include "lluictrlfactory.h"
42
43// project includes
44#include "llviewerwindow.h"
45#include "llcheckboxctrl.h"
46#include "llfloaterjoystick.h"
47#include "llradiogroup.h"
48#include "llresmgr.h"
49#include "llspinctrl.h"
50#include "llslider.h"
51#include "llsliderctrl.h"
52#include "lltextbox.h"
53#include "llui.h"
54#include "llappviewer.h"
55#include "llviewercontrol.h" 35#include "llviewercontrol.h"
56 36#include "llfloaterjoystick.h"
57//Ventrella
58#include "llagent.h"
59//end Ventrella
60
61
62//
63// Imported globals
64//
65
66//
67// Globals
68//
69
70//
71// Static functions
72//
73 37
74 38
75LLPanelInput::LLPanelInput() 39LLPanelInput::LLPanelInput()
@@ -79,50 +43,41 @@ LLPanelInput::LLPanelInput()
79 43
80BOOL LLPanelInput::postBuild() 44BOOL LLPanelInput::postBuild()
81{ 45{
82 childSetAction("joystic_setup_button", onClickJoystickSetup, (void*)this); 46 childSetAction("joystick_setup_button", onClickJoystickSetup, (void*)this);
83 47
84 refresh(); 48 childSetValue("mouse_sensitivity", gSavedSettings.getF32("MouseSensitivity"));
49 childSetValue("automatic_fly", gSavedSettings.getBOOL("AutomaticFly"));
50 childSetValue("invert_mouse", gSavedSettings.getBOOL("InvertMouse"));
51 childSetValue("edit_camera_movement", gSavedSettings.getBOOL("EditCameraMovement"));
52 childSetValue("appearance_camera_movement", gSavedSettings.getBOOL("AppearanceCameraMovement"));
53 childSetValue("dynamic_camera_strength", gSavedSettings.getF32("DynamicCameraStrength"));
54 childSetValue("zoom_time", gSavedSettings.getF32("ZoomTime"));
55 childSetValue("camera_position_smoothing", gSavedSettings.getF32("CameraPositionSmoothing"));
56 childSetValue("first_person_avatar_visible", gSavedSettings.getBOOL("FirstPersonAvatarVisible"));
85 57
86 return TRUE; 58 return TRUE;
87} 59}
88 60
89
90LLPanelInput::~LLPanelInput() 61LLPanelInput::~LLPanelInput()
91{ 62{
92 // Children all cleaned up by default view destructor. 63 // Children all cleaned up by default view destructor.
93} 64}
94 65
95void LLPanelInput::refresh()
96{
97 LLPanel::refresh();
98
99 mMouseSensitivityVal = gSavedSettings.getF32("MouseSensitivity");
100 mAutomaticFly =gSavedSettings.getBOOL("AutomaticFly");
101 mInvertMouse = gSavedSettings.getBOOL("InvertMouse");
102 mEditCameraMovement = gSavedSettings.getBOOL("EditCameraMovement");
103 mAppearanceCameraMovement = gSavedSettings.getBOOL("AppearanceCameraMovement");
104 mDynamicCameraStrengthVal = gSavedSettings.getF32("DynamicCameraStrength");
105 mNumpadControlVal = gSavedSettings.getS32("NumpadControl");
106
107 // First Person Visibility
108 mFirstPersonAvatarVisible = gSavedSettings.getBOOL("FirstPersonAvatarVisible");
109}
110
111void LLPanelInput::apply() 66void LLPanelInput::apply()
112{ 67{
113 68 gSavedSettings.setF32("MouseSensitivity", childGetValue("mouse_sensitivity").asReal());
69 gSavedSettings.setBOOL("AutomaticFly", childGetValue("automatic_fly"));
70 gSavedSettings.setBOOL("InvertMouse", childGetValue("invert_mouse"));
71 gSavedSettings.setBOOL("EditCameraMovement", childGetValue("edit_camera_movement"));
72 gSavedSettings.setBOOL("AppearanceCameraMovement", childGetValue("appearance_camera_movement"));
73 gSavedSettings.setF32("DynamicCameraStrength", childGetValue("dynamic_camera_strength").asReal());
74 gSavedSettings.setF32("ZoomTime", childGetValue("zoom_time").asReal());
75 gSavedSettings.setF32("CameraPositionSmoothing", childGetValue("camera_position_smoothing").asReal());
76 gSavedSettings.setBOOL("FirstPersonAvatarVisible", childGetValue("first_person_avatar_visible"));
114} 77}
115 78
116void LLPanelInput::cancel() 79void LLPanelInput::cancel()
117{ 80{
118 gSavedSettings.setF32("MouseSensitivity", mMouseSensitivityVal);
119 gSavedSettings.setBOOL("AutomaticFly", mAutomaticFly);
120 gSavedSettings.setBOOL("InvertMouse", mInvertMouse);
121 gSavedSettings.setBOOL("EditCameraMovement", mEditCameraMovement);
122 gSavedSettings.setBOOL("AppearanceCameraMovement", mAppearanceCameraMovement);
123 gSavedSettings.setF32("DynamicCameraStrength", mDynamicCameraStrengthVal);
124 gSavedSettings.setS32("NumpadControl", mNumpadControlVal);
125 gSavedSettings.setBOOL("FirstPersonAvatarVisible", mFirstPersonAvatarVisible);
126} 81}
127 82
128//static 83//static