Fixed for review changed vars

This commit is contained in:
OfficialR3ido101 2025-04-05 19:53:02 +01:00 committed by Karol Suprynowicz
parent 585df97a19
commit aced56d934
6 changed files with 17 additions and 17 deletions

View file

@ -159,7 +159,7 @@ const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true;
const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false;
const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false;
const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = false;
const bool DEFAULT_MOUSE_LOCK = false;
const bool DEFAULT_MOUSE_CAPTURE_VR = false;
const bool DEFAULT_SHOW_GRAPHICS_ICON = true;
const bool DEFAULT_MINI_TABLET_ENABLED = false;
const bool DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED = true;
@ -226,7 +226,7 @@ Application::Application(
_hmdTabletBecomesToolbarSetting("hmdTabletBecomesToolbar", DEFAULT_HMD_TABLET_BECOMES_TOOLBAR),
_preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER),
_preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS),
_defaultMouseLock("defaultMouseLock", DEFAULT_MOUSE_LOCK),
_defaultMouseCaptureVR("defaultMouseCaptureVR", DEFAULT_MOUSE_CAPTURE_VR),
_showGraphicsIconSetting("showGraphicsIcon", DEFAULT_SHOW_GRAPHICS_ICON),
_constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
_awayStateWhenFocusLostInVREnabled("awayStateWhenFocusLostInVREnabled", DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED),

View file

@ -189,8 +189,8 @@ public:
bool getPreferAvatarFingerOverStylus() { return _preferAvatarFingerOverStylusSetting.get(); }
void setPreferAvatarFingerOverStylus(bool value) { _preferAvatarFingerOverStylusSetting.set(value); }
void setMouseLock(bool value);
bool getMouseLock();
void setMouseCaptureVR(bool value);
bool getMouseCaptureVR();
bool getShowGraphicsIcon() { return _showGraphicsIconSetting.get(); }
void setShowGraphicsIcon(bool value);
@ -794,7 +794,7 @@ private:
Setting::Handle<bool> _hmdTabletBecomesToolbarSetting;
Setting::Handle<bool> _preferStylusOverLaserSetting;
Setting::Handle<bool> _preferAvatarFingerOverStylusSetting;
Setting::Handle<bool> _defaultMouseLock;
Setting::Handle<bool> _defaultMouseCaptureVR;
Setting::Handle<bool> _showGraphicsIconSetting;
Setting::Handle<bool> _constrainToolbarPosition;
Setting::Handle<bool> _awayStateWhenFocusLostInVREnabled;

View file

@ -269,11 +269,11 @@ void Application::setHmdTabletBecomesToolbarSetting(bool value) {
updateSystemTabletMode();
}
void Application::setMouseLock(bool value) {
void Application::setMouseCaptureVR(bool value) {
_defaultMouseLock.set(value);
getApplicationCompositor().setMouseLockComposit(value);
getApplicationCompositor().setMouseLockCompositVR(value);
}
bool Application::getMouseLock() {
bool Application::getMouseCaptureVR() {
return _defaultMouseLock.get();
}

View file

@ -169,8 +169,8 @@ void setupPreferences() {
}
{
auto getter = []() -> bool { return qApp->getMouseLock(); };
auto setter = [](bool value) { qApp->setMouseLock(value); };
auto getter = []() -> bool { return qApp->getMouseCaptureVR(); };
auto setter = [](bool value) { qApp->setMouseCaptureVR(value); };
auto preference = new CheckPreference(UI_CATEGORY, "3D mouse cursor in VR", getter, setter);
preferences->addPreference(preference);
}

View file

@ -188,7 +188,7 @@ static bool isWindowActive() {
}
bool CompositorHelper::shouldCaptureMouse() const {
if (!_allowMouseCapture) {
if (!_allowMouseCaptureVR) {
return false;
}
@ -214,13 +214,13 @@ bool CompositorHelper::shouldCaptureMouse() const {
}
void CompositorHelper::setAllowMouseCapture(bool capture) {
if (capture != _allowMouseCapture) {
_allowMouseCapture = capture;
if (capture != _allowMouseCaptureVR) {
_allowMouseCaptureVR = capture;
emit allowMouseCaptureChanged();
}
}
void CompositorHelper::setMouseLockComposit(bool capture) {
void CompositorHelper::setMouseLockCompositVR(bool capture) {
_mouseLockComposit = capture;
}

View file

@ -104,9 +104,9 @@ public:
bool shouldCaptureMouse() const;
bool getAllowMouseCapture() const { return _allowMouseCapture; }
bool getAllowMouseCapture() const { return _allowMouseCaptureVR; }
void setAllowMouseCapture(bool capture);
void setMouseLockComposit(bool capture);
void setMouseLockCompositVR(bool capture);
/// if the reticle is pointing to a system overlay (a dialog box for example) then the function returns true otherwise false
bool getReticleOverDesktop() const;
@ -169,7 +169,7 @@ private:
bool _reticleOverQml { false };
std::atomic<bool> _allowMouseCapture{ true };
std::atomic<bool> _allowMouseCaptureVR{ true };
std::atomic<bool> _mouseLockComposit{ false };
bool _fakeMouseEvent { false };