2022-09-30 20:36:51 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_SETTINGS_CATEGORIES_INPUT_H
|
|
|
|
#define OPENMW_COMPONENTS_SETTINGS_CATEGORIES_INPUT_H
|
|
|
|
|
2023-11-01 22:34:54 +00:00
|
|
|
#include <components/settings/sanitizerimpl.hpp>
|
|
|
|
#include <components/settings/settingvalue.hpp>
|
2022-09-30 20:36:51 +00:00
|
|
|
|
|
|
|
#include <osg/Math>
|
|
|
|
#include <osg/Vec2f>
|
|
|
|
#include <osg/Vec3f>
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
namespace Settings
|
|
|
|
{
|
2023-04-10 15:24:57 +00:00
|
|
|
struct InputCategory : WithIndex
|
2022-09-30 20:36:51 +00:00
|
|
|
{
|
2023-04-10 15:24:57 +00:00
|
|
|
using WithIndex::WithIndex;
|
|
|
|
|
|
|
|
SettingValue<bool> mGrabCursor{ mIndex, "Input", "grab cursor" };
|
|
|
|
SettingValue<float> mCameraSensitivity{ mIndex, "Input", "camera sensitivity", makeMaxStrictSanitizerFloat(0) };
|
|
|
|
SettingValue<float> mCameraYMultiplier{ mIndex, "Input", "camera y multiplier",
|
|
|
|
makeMaxStrictSanitizerFloat(0) };
|
|
|
|
SettingValue<bool> mInvertXAxis{ mIndex, "Input", "invert x axis" };
|
|
|
|
SettingValue<bool> mInvertYAxis{ mIndex, "Input", "invert y axis" };
|
|
|
|
SettingValue<bool> mEnableController{ mIndex, "Input", "enable controller" };
|
|
|
|
SettingValue<float> mGamepadCursorSpeed{ mIndex, "Input", "gamepad cursor speed",
|
|
|
|
makeMaxStrictSanitizerFloat(0) };
|
|
|
|
SettingValue<float> mJoystickDeadZone{ mIndex, "Input", "joystick dead zone",
|
|
|
|
makeClampSanitizerFloat(0, 0.5f) };
|
|
|
|
SettingValue<bool> mEnableGyroscope{ mIndex, "Input", "enable gyroscope" };
|
2023-07-21 22:52:37 +00:00
|
|
|
SettingValue<GyroscopeAxis> mGyroHorizontalAxis{ mIndex, "Input", "gyro horizontal axis" };
|
|
|
|
SettingValue<GyroscopeAxis> mGyroVerticalAxis{ mIndex, "Input", "gyro vertical axis" };
|
2023-04-10 15:24:57 +00:00
|
|
|
SettingValue<float> mGyroInputThreshold{ mIndex, "Input", "gyro input threshold", makeMaxSanitizerFloat(0) };
|
|
|
|
SettingValue<float> mGyroHorizontalSensitivity{ mIndex, "Input", "gyro horizontal sensitivity",
|
2022-09-30 20:36:51 +00:00
|
|
|
makeMaxStrictSanitizerFloat(0) };
|
2023-04-10 15:24:57 +00:00
|
|
|
SettingValue<float> mGyroVerticalSensitivity{ mIndex, "Input", "gyro vertical sensitivity",
|
2022-09-30 20:36:51 +00:00
|
|
|
makeMaxStrictSanitizerFloat(0) };
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|