From 871943d6a90bdb92b3cc495d4d927199611f8c6b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 4 Feb 2021 20:45:18 -0500 Subject: Added text boxes Text now reveals itself and scrolls! Yay! It even plays speaker beeps. TODO: the arror indicating an A press is needed. Bullets on lines that need bullets. The header that says who the speaker is, if relevant. --- src/input_system.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/input_system.cpp') diff --git a/src/input_system.cpp b/src/input_system.cpp index 7bd605c..a0acc5e 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp @@ -27,11 +27,16 @@ void InputSystem::tick(double dt) { } } else if (e.key.keysym.sym == SDLK_a) { // TODO: Remove this, it's just for testing. - if (game_.getSystem().getCutsceneBarsProgress() == 1.0) { + /*if (game_.getSystem().getCutsceneBarsProgress() == 1.0) { game_.getSystem().hideCutsceneBars(); } else { game_.getSystem().displayCutsceneBars(); - } + }*/ + //game_.getSystem().displayMessage("Some people always try to avoid fighting when there are enemies around. You know the type, right? They use the dash ability to zoom right by. I guess you could say they're followers of \"peace at any price\".", SpeakerType::Woman); + game_.getSystem().displayMessage("Go to sleep.\nIn the absolute darkness.\nDon't do aaaanything.\nDon't see anyone.\nJust sleep.\nIt'll be oh, so much fun......!\nOhohohoho!", SpeakerType::Woman); + } else if (e.key.keysym.sym == SDLK_b) { + // TODO: Remove this, it's just for testing. + game_.getSystem().advanceText(); } } 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