summary refs log tree commit diff stats
path: root/src/input_system.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 09:51:24 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 15:34:50 -0500
commitf9dd0fbabe5348fcd9841978cdd9d3a5824a5dec (patch)
tree2d27fd932135254f8cc7f73146f78a283f4038a4 /src/input_system.cpp
parent7b0ac7fc096b2dadb47780e9afd141395b6a111b (diff)
downloadtanetane-f9dd0fbabe5348fcd9841978cdd9d3a5824a5dec.tar.gz
tanetane-f9dd0fbabe5348fcd9841978cdd9d3a5824a5dec.tar.bz2
tanetane-f9dd0fbabe5348fcd9841978cdd9d3a5824a5dec.zip
Pause menu commands can do something
#7
Diffstat (limited to 'src/input_system.cpp')
-rw-r--r--src/input_system.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input_system.cpp b/src/input_system.cpp index 0c68c49..25af7ed 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp
@@ -75,6 +75,10 @@ void InputSystem::tick(double dt) {
75 } 75 }
76 } 76 }
77 } else if (e.key.keysym.sym == SDLK_SPACE) { 77 } else if (e.key.keysym.sym == SDLK_SPACE) {
78 if (game_.getSystem<MenuSystem>().isMenuOpen()) {
79 game_.getSystem<MenuSystem>().activateOption();
80 }
81
78 if (game_.isGameplayPaused()) continue; 82 if (game_.isGameplayPaused()) continue;
79 83
80 // If there is text on screen, try to advance it. 84 // If there is text on screen, try to advance it.