Added options menu choice for 'MouseLook', defaults off

This commit is contained in:
Philip Rosedale 2013-05-20 11:50:04 -07:00
parent 5475b19a9e
commit 50ee9b9ee4
2 changed files with 10 additions and 5 deletions

View file

@ -860,11 +860,13 @@ void Application::idle() {
}
// Update from Mouse
QPoint mouse = QCursor::pos();
_myAvatar.updateFromMouse(_glWidget->mapFromGlobal(mouse).x(),
_glWidget->mapFromGlobal(mouse).y(),
_glWidget->width(),
_glWidget->height());
if (_mouseLook->isChecked()) {
QPoint mouse = QCursor::pos();
_myAvatar.updateFromMouse(_glWidget->mapFromGlobal(mouse).x(),
_glWidget->mapFromGlobal(mouse).y(),
_glWidget->width(),
_glWidget->height());
}
// Read serial port interface devices
if (_serialPort.active) {
@ -1117,6 +1119,8 @@ void Application::initMenu() {
optionsMenu->addAction("Noise", this, SLOT(setNoise(bool)), Qt::Key_N)->setCheckable(true);
(_gyroLook = optionsMenu->addAction("Gyro Look"))->setCheckable(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);
QMenu* renderMenu = menuBar->addMenu("Render");

View file

@ -133,6 +133,7 @@ private:
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* _mouseLook; // Whether the have the mouse near edge of screen move your view
QAction* _renderVoxels; // Whether to render voxels
QAction* _renderStarsOn; // Whether to display the stars
QAction* _renderAtmosphereOn; // Whether to display the atmosphere