Skip to content
Snippets Groups Projects
Commit 93f4a9e1 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add keyboard pause

parent d88dfebc
No related branches found
No related tags found
No related merge requests found
Pipeline #26224 passed
...@@ -503,6 +503,8 @@ bool ftl::gui::Screen::keyboardEvent(int key, int scancode, int action, int modi ...@@ -503,6 +503,8 @@ bool ftl::gui::Screen::keyboardEvent(int key, int scancode, int action, int modi
} else if (action == 1 && key == 'H') { } else if (action == 1 && key == 'H') {
swindow_->setVisible(false); swindow_->setVisible(false);
//cwindow_->setVisible(false); //cwindow_->setVisible(false);
} else if (action == 1 && key == ' ') {
swindow_->togglePaused();
} else if (action == 1) { } else if (action == 1) {
std::string combo = generateKeyComboStr(key, modifiers); std::string combo = generateKeyComboStr(key, modifiers);
......
...@@ -52,6 +52,7 @@ class SourceWindow : public nanogui::Window { ...@@ -52,6 +52,7 @@ class SourceWindow : public nanogui::Window {
inline std::vector<ftl::rgbd::FrameSet*> &getFramesets() { return framesets_; } inline std::vector<ftl::rgbd::FrameSet*> &getFramesets() { return framesets_; }
inline void paused(bool p) { paused_ = p; } inline void paused(bool p) { paused_ = p; }
inline void togglePaused() { paused_ = !paused_; }
private: private:
ftl::gui::Screen *screen_; ftl::gui::Screen *screen_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment