/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. #ifndef LL_LLFLOATERJOYSTICK_H
  27. #define LL_LLFLOATERJOYSTICK_H
  28. #include "llfloater.h"
  29. #include "llstatview.h"
  30. class LLCheckBoxCtrl;
  31. class LLFloaterJoystick : public LLFloater
  32. {
  33. friend class LLFloaterReg;
  34. public:
  35. virtual BOOL postBuild();
  36. virtual void refresh();
  37. virtual void apply(); // Apply the changed values.
  38. virtual void cancel(); // Cancel the changed values.
  39. virtual void draw();
  40. static void setSNDefaults();
  41. private:
  42. LLFloaterJoystick(const LLSD& data);
  43. virtual ~LLFloaterJoystick();
  44. void initFromSettings();
  45. static void onCommitJoystickEnabled(LLUICtrl*, void*);
  46. static void onClickRestoreSNDefaults(void*);
  47. static void onClickCancel(void*);
  48. static void onClickOK(void*);
  49. private:
  50. // Device prefs
  51. bool mJoystickEnabled;
  52. S32 mJoystickAxis[7];
  53. bool m3DCursor;
  54. bool mAutoLeveling;
  55. bool mZoomDirect;
  56. // Modes prefs
  57. bool mAvatarEnabled;
  58. bool mBuildEnabled;
  59. bool mFlycamEnabled;
  60. F32 mAvatarAxisScale[6];
  61. F32 mBuildAxisScale[6];
  62. F32 mFlycamAxisScale[7];
  63. F32 mAvatarAxisDeadZone[6];
  64. F32 mBuildAxisDeadZone[6];
  65. F32 mFlycamAxisDeadZone[7];
  66. F32 mAvatarFeathering;
  67. F32 mBuildFeathering;
  68. F32 mFlycamFeathering;
  69. // Controls that can disable the flycam
  70. LLCheckBoxCtrl *mCheckJoystickEnabled;
  71. LLCheckBoxCtrl *mCheckFlycamEnabled;
  72. // stats view
  73. LLStat* mAxisStats[6];
  74. LLStatBar* mAxisStatsBar[6];
  75. };
  76. #endif