mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 01:23:17 +02:00
Fixed for review changed vars
This commit is contained in:
parent
585df97a19
commit
aced56d934
6 changed files with 17 additions and 17 deletions
|
@ -159,7 +159,7 @@ const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true;
|
||||||
const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false;
|
const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false;
|
||||||
const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false;
|
const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false;
|
||||||
const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = 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_SHOW_GRAPHICS_ICON = true;
|
||||||
const bool DEFAULT_MINI_TABLET_ENABLED = false;
|
const bool DEFAULT_MINI_TABLET_ENABLED = false;
|
||||||
const bool DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED = true;
|
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),
|
_hmdTabletBecomesToolbarSetting("hmdTabletBecomesToolbar", DEFAULT_HMD_TABLET_BECOMES_TOOLBAR),
|
||||||
_preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER),
|
_preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER),
|
||||||
_preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS),
|
_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),
|
_showGraphicsIconSetting("showGraphicsIcon", DEFAULT_SHOW_GRAPHICS_ICON),
|
||||||
_constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
|
_constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
|
||||||
_awayStateWhenFocusLostInVREnabled("awayStateWhenFocusLostInVREnabled", DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED),
|
_awayStateWhenFocusLostInVREnabled("awayStateWhenFocusLostInVREnabled", DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED),
|
||||||
|
|
|
@ -189,8 +189,8 @@ public:
|
||||||
bool getPreferAvatarFingerOverStylus() { return _preferAvatarFingerOverStylusSetting.get(); }
|
bool getPreferAvatarFingerOverStylus() { return _preferAvatarFingerOverStylusSetting.get(); }
|
||||||
void setPreferAvatarFingerOverStylus(bool value) { _preferAvatarFingerOverStylusSetting.set(value); }
|
void setPreferAvatarFingerOverStylus(bool value) { _preferAvatarFingerOverStylusSetting.set(value); }
|
||||||
|
|
||||||
void setMouseLock(bool value);
|
void setMouseCaptureVR(bool value);
|
||||||
bool getMouseLock();
|
bool getMouseCaptureVR();
|
||||||
|
|
||||||
bool getShowGraphicsIcon() { return _showGraphicsIconSetting.get(); }
|
bool getShowGraphicsIcon() { return _showGraphicsIconSetting.get(); }
|
||||||
void setShowGraphicsIcon(bool value);
|
void setShowGraphicsIcon(bool value);
|
||||||
|
@ -794,7 +794,7 @@ private:
|
||||||
Setting::Handle<bool> _hmdTabletBecomesToolbarSetting;
|
Setting::Handle<bool> _hmdTabletBecomesToolbarSetting;
|
||||||
Setting::Handle<bool> _preferStylusOverLaserSetting;
|
Setting::Handle<bool> _preferStylusOverLaserSetting;
|
||||||
Setting::Handle<bool> _preferAvatarFingerOverStylusSetting;
|
Setting::Handle<bool> _preferAvatarFingerOverStylusSetting;
|
||||||
Setting::Handle<bool> _defaultMouseLock;
|
Setting::Handle<bool> _defaultMouseCaptureVR;
|
||||||
Setting::Handle<bool> _showGraphicsIconSetting;
|
Setting::Handle<bool> _showGraphicsIconSetting;
|
||||||
Setting::Handle<bool> _constrainToolbarPosition;
|
Setting::Handle<bool> _constrainToolbarPosition;
|
||||||
Setting::Handle<bool> _awayStateWhenFocusLostInVREnabled;
|
Setting::Handle<bool> _awayStateWhenFocusLostInVREnabled;
|
||||||
|
|
|
@ -269,11 +269,11 @@ void Application::setHmdTabletBecomesToolbarSetting(bool value) {
|
||||||
updateSystemTabletMode();
|
updateSystemTabletMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setMouseLock(bool value) {
|
void Application::setMouseCaptureVR(bool value) {
|
||||||
_defaultMouseLock.set(value);
|
_defaultMouseLock.set(value);
|
||||||
getApplicationCompositor().setMouseLockComposit(value);
|
getApplicationCompositor().setMouseLockCompositVR(value);
|
||||||
}
|
}
|
||||||
bool Application::getMouseLock() {
|
bool Application::getMouseCaptureVR() {
|
||||||
return _defaultMouseLock.get();
|
return _defaultMouseLock.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,8 +169,8 @@ void setupPreferences() {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
auto getter = []() -> bool { return qApp->getMouseLock(); };
|
auto getter = []() -> bool { return qApp->getMouseCaptureVR(); };
|
||||||
auto setter = [](bool value) { qApp->setMouseLock(value); };
|
auto setter = [](bool value) { qApp->setMouseCaptureVR(value); };
|
||||||
auto preference = new CheckPreference(UI_CATEGORY, "3D mouse cursor in VR", getter, setter);
|
auto preference = new CheckPreference(UI_CATEGORY, "3D mouse cursor in VR", getter, setter);
|
||||||
preferences->addPreference(preference);
|
preferences->addPreference(preference);
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ static bool isWindowActive() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompositorHelper::shouldCaptureMouse() const {
|
bool CompositorHelper::shouldCaptureMouse() const {
|
||||||
if (!_allowMouseCapture) {
|
if (!_allowMouseCaptureVR) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,13 +214,13 @@ bool CompositorHelper::shouldCaptureMouse() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompositorHelper::setAllowMouseCapture(bool capture) {
|
void CompositorHelper::setAllowMouseCapture(bool capture) {
|
||||||
if (capture != _allowMouseCapture) {
|
if (capture != _allowMouseCaptureVR) {
|
||||||
_allowMouseCapture = capture;
|
_allowMouseCaptureVR = capture;
|
||||||
emit allowMouseCaptureChanged();
|
emit allowMouseCaptureChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompositorHelper::setMouseLockComposit(bool capture) {
|
void CompositorHelper::setMouseLockCompositVR(bool capture) {
|
||||||
_mouseLockComposit = capture;
|
_mouseLockComposit = capture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,9 @@ public:
|
||||||
|
|
||||||
bool shouldCaptureMouse() const;
|
bool shouldCaptureMouse() const;
|
||||||
|
|
||||||
bool getAllowMouseCapture() const { return _allowMouseCapture; }
|
bool getAllowMouseCapture() const { return _allowMouseCaptureVR; }
|
||||||
void setAllowMouseCapture(bool capture);
|
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
|
/// if the reticle is pointing to a system overlay (a dialog box for example) then the function returns true otherwise false
|
||||||
bool getReticleOverDesktop() const;
|
bool getReticleOverDesktop() const;
|
||||||
|
@ -169,7 +169,7 @@ private:
|
||||||
|
|
||||||
bool _reticleOverQml { false };
|
bool _reticleOverQml { false };
|
||||||
|
|
||||||
std::atomic<bool> _allowMouseCapture{ true };
|
std::atomic<bool> _allowMouseCaptureVR{ true };
|
||||||
std::atomic<bool> _mouseLockComposit{ false };
|
std::atomic<bool> _mouseLockComposit{ false };
|
||||||
|
|
||||||
bool _fakeMouseEvent { false };
|
bool _fakeMouseEvent { false };
|
||||||
|
|
Loading…
Reference in a new issue