remove custom key handlers

pull/3471/head
kallaballa 2 years ago
parent f6c3998525
commit 9d0f75244d
  1. 19
      src/common/viz2d.cpp

@ -319,17 +319,14 @@ nanogui::FormHelper* Viz2D::form() {
bool Viz2D::keyboard_event(int key, int scancode, int action, int modifiers) { bool Viz2D::keyboard_event(int key, int scancode, int action, int modifiers) {
if (screen().keyboard_event(key, scancode, action, modifiers)) if (screen().keyboard_event(key, scancode, action, modifiers))
return true; return true;
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) { // if (key == GLFW_KEY_TAB && action == GLFW_PRESS) {
setOffscreen(!isOffscreen()); // auto children = screen().children();
return true; // for(auto* child : children) {
} else if (key == GLFW_KEY_TAB && action == GLFW_PRESS) { // child->set_visible(!child->visible());
auto children = screen().children(); // }
for(auto* child : children) { //
child->set_visible(!child->visible()); // return true;
} // }
return true;
}
return false; return false;
} }

Loading…
Cancel
Save