From ec511705ce96d80d4e2a36054769c211448e8ec8 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 11 Feb 2021 20:47:46 -0500 Subject: Added choice prompts "A presses" are also no longer special values in the lines list, but are rather a field on the MessageLine object. --- src/input_system.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/input_system.cpp') 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) { game_.getSystem().runScript("default"); } } + } else if (e.key.keysym.sym == SDLK_LEFT) { + if (game_.getSystem().isChoiceActive()) { + game_.getSystem().selectFirstChoice(); + } + } else if (e.key.keysym.sym == SDLK_RIGHT) { + if (game_.getSystem().isChoiceActive()) { + game_.getSystem().selectSecondChoice(); + } } } else if (e.type == SDL_KEYUP && (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT)) { for (int spriteId : game_.getSprites()) { -- cgit 1.4.1