mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add toggle for user interface display
- "/" toggles UI (incl. stats if displayed); menu View > User Interface - "%" = toggle status; menu View > Stats - Acts on normal, 3DTV, and Oculus display.
This commit is contained in:
parent
4798cad1e5
commit
8b04a9c8b6
5 changed files with 21 additions and 20 deletions
|
@ -683,16 +683,11 @@ void Application::paintGL() {
|
||||||
_rearMirrorTools->render(true);
|
_rearMirrorTools->render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
PerformanceTimer perfTimer("paintGL/renderOverlay");
|
||||||
PerformanceTimer perfTimer("paintGL/renderOverlay");
|
// PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
|
||||||
//If alpha is 1, we can render directly to the screen.
|
_applicationOverlay.renderOverlay(true);
|
||||||
if (_applicationOverlay.getAlpha() == 1.0f) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
|
||||||
_applicationOverlay.renderOverlay();
|
_applicationOverlay.displayOverlayTexture();
|
||||||
} else {
|
|
||||||
//Render to to texture so we can fade it
|
|
||||||
_applicationOverlay.renderOverlay(true);
|
|
||||||
_applicationOverlay.displayOverlayTexture();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1012,6 +1007,9 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror);
|
Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Qt::Key_Slash:
|
||||||
|
Menu::getInstance()->triggerOption(MenuOption::UserInterface);
|
||||||
|
break;
|
||||||
case Qt::Key_F:
|
case Qt::Key_F:
|
||||||
if (isShifted) {
|
if (isShifted) {
|
||||||
Menu::getInstance()->triggerOption(MenuOption::DisplayFrustum);
|
Menu::getInstance()->triggerOption(MenuOption::DisplayFrustum);
|
||||||
|
@ -1031,7 +1029,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Slash:
|
case Qt::Key_Percent:
|
||||||
Menu::getInstance()->triggerOption(MenuOption::Stats);
|
Menu::getInstance()->triggerOption(MenuOption::Stats);
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Plus:
|
case Qt::Key_Plus:
|
||||||
|
@ -2793,7 +2791,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
|
||||||
|
|
||||||
if (!selfAvatarOnly) {
|
if (!selfAvatarOnly) {
|
||||||
// Render the world box
|
// Render the world box
|
||||||
if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats)) {
|
if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats) && Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
|
||||||
PerformanceTimer perfTimer("paintGL/displaySide/renderWorldBox");
|
PerformanceTimer perfTimer("paintGL/displaySide/renderWorldBox");
|
||||||
renderWorldBox();
|
renderWorldBox();
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,6 +276,7 @@ Menu::Menu() :
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Mirror, Qt::SHIFT | Qt::Key_H, true);
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Mirror, Qt::SHIFT | Qt::Key_H, true);
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FullscreenMirror, Qt::Key_H, false,
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FullscreenMirror, Qt::Key_H, false,
|
||||||
appInstance, SLOT(cameraMenuChanged()));
|
appInstance, SLOT(cameraMenuChanged()));
|
||||||
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::UserInterface, Qt::Key_Slash);
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::EnableVRMode, 0,
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::EnableVRMode, 0,
|
||||||
false,
|
false,
|
||||||
|
@ -326,7 +327,7 @@ Menu::Menu() :
|
||||||
|
|
||||||
|
|
||||||
addDisabledActionAndSeparator(viewMenu, "Stats");
|
addDisabledActionAndSeparator(viewMenu, "Stats");
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats, Qt::Key_Slash);
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats, Qt::Key_Percent);
|
||||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::Log, Qt::CTRL | Qt::Key_L, appInstance, SLOT(toggleLogDialog()));
|
addActionToQMenuAndActionHash(viewMenu, MenuOption::Log, Qt::CTRL | Qt::Key_L, appInstance, SLOT(toggleLogDialog()));
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Bandwidth, 0, true);
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Bandwidth, 0, true);
|
||||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::BandwidthDetails, 0, this, SLOT(bandwidthDetails()));
|
addActionToQMenuAndActionHash(viewMenu, MenuOption::BandwidthDetails, 0, this, SLOT(bandwidthDetails()));
|
||||||
|
@ -407,9 +408,6 @@ Menu::Menu() :
|
||||||
addCheckableActionToQMenuAndActionHash(avatarOptionsMenu, MenuOption::GlowWhenSpeaking, 0, true);
|
addCheckableActionToQMenuAndActionHash(avatarOptionsMenu, MenuOption::GlowWhenSpeaking, 0, true);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarOptionsMenu, MenuOption::ChatCircling, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarOptionsMenu, MenuOption::ChatCircling, 0, false);
|
||||||
|
|
||||||
QMenu* oculusOptionsMenu = developerMenu->addMenu("Oculus Options");
|
|
||||||
addCheckableActionToQMenuAndActionHash(oculusOptionsMenu, MenuOption::DisplayOculusOverlays, 0, true);
|
|
||||||
|
|
||||||
QMenu* sixenseOptionsMenu = developerMenu->addMenu("Sixense Options");
|
QMenu* sixenseOptionsMenu = developerMenu->addMenu("Sixense Options");
|
||||||
addCheckableActionToQMenuAndActionHash(sixenseOptionsMenu, MenuOption::SixenseMouseInput, 0, true);
|
addCheckableActionToQMenuAndActionHash(sixenseOptionsMenu, MenuOption::SixenseMouseInput, 0, true);
|
||||||
|
|
||||||
|
|
|
@ -349,7 +349,6 @@ namespace MenuOption {
|
||||||
const QString DisplayModelBounds = "Display Model Bounds";
|
const QString DisplayModelBounds = "Display Model Bounds";
|
||||||
const QString DisplayModelElementProxy = "Display Model Element Bounds";
|
const QString DisplayModelElementProxy = "Display Model Element Bounds";
|
||||||
const QString DisplayModelElementChildProxies = "Display Model Element Children";
|
const QString DisplayModelElementChildProxies = "Display Model Element Children";
|
||||||
const QString DisplayOculusOverlays = "Display Oculus Overlays";
|
|
||||||
const QString DisplayTimingDetails = "Display Timing Details";
|
const QString DisplayTimingDetails = "Display Timing Details";
|
||||||
const QString DontFadeOnVoxelServerChanges = "Don't Fade In/Out on Voxel Server Changes";
|
const QString DontFadeOnVoxelServerChanges = "Don't Fade In/Out on Voxel Server Changes";
|
||||||
const QString EchoLocalAudio = "Echo Local Audio";
|
const QString EchoLocalAudio = "Echo Local Audio";
|
||||||
|
@ -438,6 +437,7 @@ namespace MenuOption {
|
||||||
const QString UploadAttachment = "Upload Attachment Model";
|
const QString UploadAttachment = "Upload Attachment Model";
|
||||||
const QString UploadHead = "Upload Head Model";
|
const QString UploadHead = "Upload Head Model";
|
||||||
const QString UploadSkeleton = "Upload Skeleton Model";
|
const QString UploadSkeleton = "Upload Skeleton Model";
|
||||||
|
const QString UserInterface = "UserInterface";
|
||||||
const QString Visage = "Visage";
|
const QString Visage = "Visage";
|
||||||
const QString VoxelMode = "Cycle Voxel Mode";
|
const QString VoxelMode = "Cycle Voxel Mode";
|
||||||
const QString Voxels = "Voxels";
|
const QString Voxels = "Voxels";
|
||||||
|
|
|
@ -269,7 +269,7 @@ void OculusManager::display(const glm::quat &bodyOrientation, const glm::vec3 &p
|
||||||
// We only need to render the overlays to a texture once, then we just render the texture on the hemisphere
|
// We only need to render the overlays to a texture once, then we just render the texture on the hemisphere
|
||||||
// PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
|
// PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
|
||||||
applicationOverlay.renderOverlay(true);
|
applicationOverlay.renderOverlay(true);
|
||||||
const bool displayOverlays = Menu::getInstance()->isOptionChecked(MenuOption::DisplayOculusOverlays);
|
const bool displayOverlays = Menu::getInstance()->isOptionChecked(MenuOption::UserInterface);
|
||||||
|
|
||||||
//Bind our framebuffer object. If we are rendering the glow effect, we let the glow effect shader take care of it
|
//Bind our framebuffer object. If we are rendering the glow effect, we let the glow effect shader take care of it
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableGlowEffect)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableGlowEffect)) {
|
||||||
|
|
|
@ -100,6 +100,7 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
// We only need to render the overlays to a texture once, then we just render the texture as a quad
|
// We only need to render the overlays to a texture once, then we just render the texture as a quad
|
||||||
// PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
|
// PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
|
||||||
applicationOverlay.renderOverlay(true);
|
applicationOverlay.renderOverlay(true);
|
||||||
|
const bool displayOverlays = Menu::getInstance()->isOptionChecked(MenuOption::UserInterface);
|
||||||
|
|
||||||
if (glowEnabled) {
|
if (glowEnabled) {
|
||||||
Application::getInstance()->getGlowEffect()->prepare();
|
Application::getInstance()->getGlowEffect()->prepare();
|
||||||
|
@ -128,7 +129,9 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
Application::getInstance()->displaySide(whichCamera);
|
Application::getInstance()->displaySide(whichCamera);
|
||||||
|
|
||||||
applicationOverlay.displayOverlayTexture3DTV(whichCamera, _aspect, fov);
|
if (displayOverlays) {
|
||||||
|
applicationOverlay.displayOverlayTexture3DTV(whichCamera, _aspect, fov);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
@ -154,7 +157,9 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
Application::getInstance()->displaySide(whichCamera);
|
Application::getInstance()->displaySide(whichCamera);
|
||||||
|
|
||||||
applicationOverlay.displayOverlayTexture3DTV(whichCamera, _aspect, fov);
|
if (displayOverlays) {
|
||||||
|
applicationOverlay.displayOverlayTexture3DTV(whichCamera, _aspect, fov);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
|
Loading…
Reference in a new issue