mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 01:08:48 +02:00
CR
This commit is contained in:
parent
1403f8908f
commit
932f5dbfb3
6 changed files with 8 additions and 15 deletions
|
@ -5922,19 +5922,7 @@ void Application::cameraModeChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Application::shouldCaptureMouse() const {
|
bool Application::shouldCaptureMouse() const {
|
||||||
if (!_captureMouse) {
|
return _captureMouse && _glWidget->isActiveWindow() && !ui::Menu::isSomeSubmenuShown();
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_glWidget->isActiveWindow()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ui::Menu::isSomeSubmenuShown()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::captureMouseChanged(bool captureMouse) {
|
void Application::captureMouseChanged(bool captureMouse) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//
|
//
|
||||||
// Created by Benjamin Arnold on 5/27/14.
|
// Created by Benjamin Arnold on 5/27/14.
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
// Copyright 2014 High Fidelity, Inc.
|
||||||
|
// Copyright 2020 Vircadia contributors.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//
|
//
|
||||||
// Created by Bradley Austin Davis Arnold on 2015/06/13
|
// Created by Bradley Austin Davis Arnold on 2015/06/13
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
|
// Copyright 2020 Vircadia contributors.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
// Created by Sam Gateau on 4/27/15.
|
// Created by Sam Gateau on 4/27/15.
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
|
// Copyright 2020 Vircadia contributors.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
// Created by Sam Gateau on 4/27/15.
|
// Created by Sam Gateau on 4/27/15.
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
|
// Copyright 2020 Vircadia contributors.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// interface/src
|
// interface/src
|
||||||
//
|
//
|
||||||
// Copyright 2013 High Fidelity, Inc.
|
// Copyright 2013 High Fidelity, Inc.
|
||||||
|
// Copyright 2020 Vircadia contributors.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
@ -119,9 +120,9 @@ public slots:
|
||||||
bool getCaptureMouse() const { return _captureMouse; }
|
bool getCaptureMouse() const { return _captureMouse; }
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Sets mouse capture state.
|
* Sets the mouse capture state.
|
||||||
* @function Camera.setCaptureMouse
|
* @function Camera.setCaptureMouse
|
||||||
* @param {boolean} captureMouse - Whether or not to capture the mouse.
|
* @param {boolean} captureMouse - <code>true</code> to capture the mouse, <code>false</code> to release the mouse.
|
||||||
*/
|
*/
|
||||||
void setCaptureMouse(bool captureMouse) { _captureMouse = captureMouse; emit captureMouseUpdated(captureMouse); }
|
void setCaptureMouse(bool captureMouse) { _captureMouse = captureMouse; emit captureMouseUpdated(captureMouse); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue