Hide the cursor when in fullscreen Oculus mode.

This commit is contained in:
Andrzej Kapolka 2013-05-23 17:58:04 -07:00
parent 9be4f06e9a
commit add84b2f39
2 changed files with 9 additions and 0 deletions

View file

@ -1002,6 +1002,7 @@ void Application::setNoise(bool noise) {
void Application::setFullscreen(bool fullscreen) {
_window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
(_window->windowState() & ~Qt::WindowFullScreen));
updateCursor();
}
void Application::setRenderFirstPerson(bool firstPerson) {
@ -1010,6 +1011,7 @@ void Application::setRenderFirstPerson(bool firstPerson) {
void Application::setOculus(bool oculus) {
resizeGL(_glWidget->width(), _glWidget->height());
updateCursor();
}
void Application::setFrustumOffset(bool frustumOffset) {
@ -2080,6 +2082,11 @@ void Application::setMenuShortcutsEnabled(bool enabled) {
setShortcutsEnabled(_window->menuBar(), enabled);
}
void Application::updateCursor() {
_glWidget->setCursor(_oculusOn->isChecked() && _window->windowState().testFlag(Qt::WindowFullScreen) ?
Qt::BlankCursor : Qt::ArrowCursor);
}
// when QActionGroup is set to non-exclusive, it doesn't return anything as checked;
// hence, we must check ourselves
QAction* Application::checkedVoxelModeAction() const {

View file

@ -128,6 +128,8 @@ private:
void setMenuShortcutsEnabled(bool enabled);
void updateCursor();
QAction* checkedVoxelModeAction() const;
static void attachNewHeadToAgent(Agent *newAgent);