mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:03:57 +02:00
Screw it; just use the standard mouse hiding.
This commit is contained in:
parent
bdba05785e
commit
fa5f8b093c
2 changed files with 2 additions and 8 deletions
|
@ -1082,7 +1082,7 @@ void Application::keyReleaseEvent(QKeyEvent* event) {
|
|||
|
||||
void Application::mouseMoveEvent(QMouseEvent* event) {
|
||||
_lastMouseMove = usecTimestampNow();
|
||||
if (_mouseHidden && !isFullscreenOculus()) {
|
||||
if (_mouseHidden) {
|
||||
getGLWidget()->setCursor(Qt::ArrowCursor);
|
||||
_mouseHidden = false;
|
||||
_seenMouseMove = true;
|
||||
|
@ -1658,10 +1658,6 @@ void Application::findAxisAlignment() {
|
|||
}
|
||||
}
|
||||
|
||||
bool Application::isFullscreenOculus() const {
|
||||
return OculusManager::isConnected() && _window->windowState().testFlag(Qt::WindowFullScreen);
|
||||
}
|
||||
|
||||
void Application::nudgeVoxels() {
|
||||
VoxelNode* selectedNode = _voxels.getVoxelAt(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s);
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::VoxelSelectMode) && selectedNode) {
|
||||
|
@ -2400,7 +2396,7 @@ void Application::updateCursor(float deltaTime) {
|
|||
uint64_t now = usecTimestampNow();
|
||||
int elapsed = now - _lastMouseMove;
|
||||
const int HIDE_CURSOR_TIMEOUT = 1 * 1000 * 1000; // 1 second
|
||||
if ((elapsed > HIDE_CURSOR_TIMEOUT && (underMouse || !_seenMouseMove)) || isFullscreenOculus()) {
|
||||
if (elapsed > HIDE_CURSOR_TIMEOUT && (underMouse || !_seenMouseMove)) {
|
||||
getGLWidget()->setCursor(Qt::BlankCursor);
|
||||
_mouseHidden = true;
|
||||
}
|
||||
|
|
|
@ -295,8 +295,6 @@ private:
|
|||
|
||||
void displayRearMirrorTools();
|
||||
|
||||
bool isFullscreenOculus() const;
|
||||
|
||||
QMainWindow* _window;
|
||||
QGLWidget* _glWidget;
|
||||
|
||||
|
|
Loading…
Reference in a new issue