mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 07:39:44 +02:00
Added options menu choice for 'MouseLook', defaults off
This commit is contained in:
parent
5475b19a9e
commit
50ee9b9ee4
2 changed files with 10 additions and 5 deletions
|
@ -860,11 +860,13 @@ void Application::idle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update from Mouse
|
// Update from Mouse
|
||||||
QPoint mouse = QCursor::pos();
|
if (_mouseLook->isChecked()) {
|
||||||
_myAvatar.updateFromMouse(_glWidget->mapFromGlobal(mouse).x(),
|
QPoint mouse = QCursor::pos();
|
||||||
_glWidget->mapFromGlobal(mouse).y(),
|
_myAvatar.updateFromMouse(_glWidget->mapFromGlobal(mouse).x(),
|
||||||
_glWidget->width(),
|
_glWidget->mapFromGlobal(mouse).y(),
|
||||||
_glWidget->height());
|
_glWidget->width(),
|
||||||
|
_glWidget->height());
|
||||||
|
}
|
||||||
|
|
||||||
// Read serial port interface devices
|
// Read serial port interface devices
|
||||||
if (_serialPort.active) {
|
if (_serialPort.active) {
|
||||||
|
@ -1117,6 +1119,8 @@ void Application::initMenu() {
|
||||||
optionsMenu->addAction("Noise", this, SLOT(setNoise(bool)), Qt::Key_N)->setCheckable(true);
|
optionsMenu->addAction("Noise", this, SLOT(setNoise(bool)), Qt::Key_N)->setCheckable(true);
|
||||||
(_gyroLook = optionsMenu->addAction("Gyro Look"))->setCheckable(true);
|
(_gyroLook = optionsMenu->addAction("Gyro Look"))->setCheckable(true);
|
||||||
_gyroLook->setChecked(true);
|
_gyroLook->setChecked(true);
|
||||||
|
(_mouseLook = optionsMenu->addAction("Mouse Look"))->setCheckable(true);
|
||||||
|
_mouseLook->setChecked(false);
|
||||||
optionsMenu->addAction("Fullscreen", this, SLOT(setFullscreen(bool)), Qt::Key_F)->setCheckable(true);
|
optionsMenu->addAction("Fullscreen", this, SLOT(setFullscreen(bool)), Qt::Key_F)->setCheckable(true);
|
||||||
|
|
||||||
QMenu* renderMenu = menuBar->addMenu("Render");
|
QMenu* renderMenu = menuBar->addMenu("Render");
|
||||||
|
|
|
@ -133,6 +133,7 @@ private:
|
||||||
|
|
||||||
QAction* _lookingInMirror; // Are we currently rendering one's own head as if in mirror?
|
QAction* _lookingInMirror; // Are we currently rendering one's own head as if in mirror?
|
||||||
QAction* _gyroLook; // Whether to allow the gyro data from head to move your view
|
QAction* _gyroLook; // Whether to allow the gyro data from head to move your view
|
||||||
|
QAction* _mouseLook; // Whether the have the mouse near edge of screen move your view
|
||||||
QAction* _renderVoxels; // Whether to render voxels
|
QAction* _renderVoxels; // Whether to render voxels
|
||||||
QAction* _renderStarsOn; // Whether to display the stars
|
QAction* _renderStarsOn; // Whether to display the stars
|
||||||
QAction* _renderAtmosphereOn; // Whether to display the atmosphere
|
QAction* _renderAtmosphereOn; // Whether to display the atmosphere
|
||||||
|
|
Loading…
Reference in a new issue