summary refs log tree commit diff stats
path: root/src/input_system.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-11 20:47:46 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-11 20:47:46 -0500
commitec511705ce96d80d4e2a36054769c211448e8ec8 (patch)
treee0a70671430a84472024d54b934df3248924ec4d /src/input_system.cpp
parentd9be54853910c2086013846661e0dc4a8603c20e (diff)
downloadtanetane-ec511705ce96d80d4e2a36054769c211448e8ec8.tar.gz
tanetane-ec511705ce96d80d4e2a36054769c211448e8ec8.tar.bz2
tanetane-ec511705ce96d80d4e2a36054769c211448e8ec8.zip
Added choice prompts
"A presses" are also no longer special values in the lines list, but are rather a field on the MessageLine object.
Diffstat (limited to 'src/input_system.cpp')
-rw-r--r--src/input_system.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input_system.cpp b/src/input_system.cpp index 5158724..6ee442a 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp
@@ -73,6 +73,14 @@ void InputSystem::tick(double dt) {
73 game_.getSystem<ScriptSystem>().runScript("default"); 73 game_.getSystem<ScriptSystem>().runScript("default");
74 } 74 }
75 } 75 }
76 } else if (e.key.keysym.sym == SDLK_LEFT) {
77 if (game_.getSystem<MessageSystem>().isChoiceActive()) {
78 game_.getSystem<MessageSystem>().selectFirstChoice();
79 }
80 } else if (e.key.keysym.sym == SDLK_RIGHT) {
81 if (game_.getSystem<MessageSystem>().isChoiceActive()) {
82 game_.getSystem<MessageSystem>().selectSecondChoice();
83 }
76 } 84 }
77 } else if (e.type == SDL_KEYUP && (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT)) { 85 } else if (e.type == SDL_KEYUP && (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT)) {
78 for (int spriteId : game_.getSprites()) { 86 for (int spriteId : game_.getSprites()) {