Skip to content
Snippets Groups Projects

viewer info on close

Closed Aaron Grabowy requested to merge feature/viewer-info-on-close into develop
1 unresolved thread
3 files
+ 26
1
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -342,11 +342,23 @@ bool ViewerApp::onKey(int key, int scancode, int action, int mods)
else
{
// Close on ESC
close_info.closed_by_key = key;
close_info.cam_pos = mCamera->getPosition();
close_info.cam_target_pos = mCamera->getTargetPos();
requestClose();
}
return true;
}
if (key == GLFW_KEY_I || key == GLFW_KEY_O)
Please register or sign in to reply
{
close_info.closed_by_key = key;
close_info.cam_pos = mCamera->getPosition();
close_info.cam_target_pos = mCamera->getTargetPos();
requestClose();
return true;
}
if (key == GLFW_KEY_F2)
renderScreenshot(mScreenshotFile);
@@ -514,7 +526,12 @@ void ViewerApp::onGui()
resetCameraToScene();
if (ImGui::MenuItem("Quit", "Esc"))
{
close_info.closed_by_key = GLFW_KEY_ESCAPE;
close_info.cam_pos = mCamera->getPosition();
close_info.cam_target_pos = mCamera->getTargetPos();
requestClose();
}
if (ImGui::MenuItem("Quit All", "Shift + Esc"))
throw TerminateException();
Loading