PageRenderTime 17ms CodeModel.GetById 2ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/newview/llfloaterjoystick.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 91 lines | 47 code | 15 blank | 29 comment | 0 complexity | 8b95201c89f46d2f4af0a0eb2b15b274 MD5 | raw file
 1/** 
 2 * @file llfloaterjoystick.h
 3 * @brief Joystick preferences panel
 4 *
 5 * $LicenseInfo:firstyear=2007&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLFLOATERJOYSTICK_H
28#define LL_LLFLOATERJOYSTICK_H
29
30#include "llfloater.h"
31#include "llstatview.h"
32
33class LLCheckBoxCtrl;
34
35class LLFloaterJoystick : public LLFloater
36{
37	friend class LLFloaterReg;
38
39public:
40
41	virtual BOOL postBuild();
42	virtual void refresh();
43	virtual void apply();	// Apply the changed values.
44	virtual void cancel();	// Cancel the changed values.
45	virtual void draw();
46	static  void setSNDefaults();
47
48private:
49
50	LLFloaterJoystick(const LLSD& data);
51	virtual ~LLFloaterJoystick();
52
53	void initFromSettings();
54	
55	static void onCommitJoystickEnabled(LLUICtrl*, void*);
56	static void onClickRestoreSNDefaults(void*);
57	static void onClickCancel(void*);
58	static void onClickOK(void*);
59
60private:
61	// Device prefs
62	bool mJoystickEnabled;
63	S32 mJoystickAxis[7];
64	bool m3DCursor;
65	bool mAutoLeveling;
66	bool mZoomDirect;
67
68	// Modes prefs
69	bool mAvatarEnabled;
70	bool mBuildEnabled;
71	bool mFlycamEnabled;
72	F32 mAvatarAxisScale[6];
73	F32 mBuildAxisScale[6];
74	F32 mFlycamAxisScale[7];
75	F32 mAvatarAxisDeadZone[6];
76	F32 mBuildAxisDeadZone[6];
77	F32 mFlycamAxisDeadZone[7];
78	F32 mAvatarFeathering;
79	F32 mBuildFeathering;
80	F32 mFlycamFeathering;
81
82	// Controls that can disable the flycam
83	LLCheckBoxCtrl	*mCheckJoystickEnabled;
84	LLCheckBoxCtrl	*mCheckFlycamEnabled;
85
86	// stats view 
87	LLStat* mAxisStats[6];
88	LLStatBar* mAxisStatsBar[6];
89};
90
91#endif