llfloaterjoystick.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /**
  2. * @file llfloaterjoystick.h
  3. * @brief Joystick preferences panel
  4. *
  5. * $LicenseInfo:firstyear=2007&license=viewergpl$
  6. *
  7. * Copyright (c) 2007-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLFLOATERJOYSTICK_H
  33. #define LL_LLFLOATERJOYSTICK_H
  34. #include "llfloater.h"
  35. class LLButton;
  36. class LLCheckBoxCtrl;
  37. class LLTextBox;
  38. class LLStat;
  39. class LLStatBar;
  40. class LLStatView;
  41. class LLFloaterJoystick final : public LLFloater,
  42. public LLFloaterSingleton<LLFloaterJoystick>
  43. {
  44. public:
  45. LLFloaterJoystick(const LLSD& data);
  46. bool postBuild() override;
  47. void refresh() override;
  48. void draw() override;
  49. private:
  50. void cancel(); // Cancel the changed values.
  51. static void onCommitJoystickEnabled(LLUICtrl*, void* userdata);
  52. static void onClickInit(void*);
  53. static void onClickCancel(void* userdata);
  54. static void onClickOK(void* userdata);
  55. static void onClickRestoreDefaults(LLUICtrl* ctrl, void* userdata);
  56. private:
  57. LLCheckBoxCtrl* mCheckJoystickEnabled;
  58. LLCheckBoxCtrl* mCheckFlycamEnabled;
  59. LLButton* mInitButon;
  60. LLTextBox* mJoystickType;
  61. LLTextBox* mJoystickButtons[16];
  62. LLStatView* mAxisStatsView;
  63. LLStat* mAxisStats[6];
  64. LLStatBar* mAxisStatsBar[6];
  65. F32 mAvatarAxisScale[6];
  66. F32 mBuildAxisScale[6];
  67. F32 mFlycamAxisScale[7];
  68. F32 mAvatarAxisDeadZone[6];
  69. F32 mBuildAxisDeadZone[6];
  70. F32 mFlycamAxisDeadZone[7];
  71. F32 mAvatarFeathering;
  72. F32 mBuildFeathering;
  73. F32 mFlycamFeathering;
  74. F32 mRunThreshold;
  75. S32 mJoystickAxis[7];
  76. S32 mJoystickButtonFlyCam;
  77. S32 mJoystickButtonJump;
  78. bool mAvatarEnabled;
  79. bool mBuildEnabled;
  80. bool mFlycamEnabled;
  81. bool mJoystickEnabled;
  82. bool m3DCursor;
  83. bool mAutoLeveling;
  84. bool mZoomDirect;
  85. };
  86. #endif