From a8564e76e88a5d2cf0d545dc4fbdabcd60ef516e Mon Sep 17 00:00:00 2001 From: Cailean Date: Mon, 21 Jul 2025 16:54:41 +0100 Subject: [PATCH] Past line function added --- src/ofTeleprompter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ofTeleprompter.cpp b/src/ofTeleprompter.cpp index da55c65..6f82438 100644 --- a/src/ofTeleprompter.cpp +++ b/src/ofTeleprompter.cpp @@ -33,7 +33,7 @@ void ofTeleprompter::update() { currentSentence = (*activeScript)[currentLine].sentence; } - currentLineIndex = ofToString(currentLine + 1) + " / " + ofToString(script.size() + 1); + currentLineIndex = ofToString(currentLine + 1) + " / " + ofToString((*activeScript).size() + 1); // Teleprompter logic (letter by letter) if (currentLetterIndex < currentSentence.size()) { @@ -226,7 +226,7 @@ void ofTeleprompter::nextLinePressed() { ofLog() << "Next Line!"; - if (currentLine < script.size()) { + if (currentLine < (*activeScript).size()) { currentLine++; } @@ -315,7 +315,7 @@ void ofTeleprompter::keyPressed(int key){ } void ofTeleprompter::pastLine() { - if (currentLine < script.size()) { + if (currentLine > 0) { currentLine--; currentSpeaker = (*activeScript)[currentLine].speaker; currentEmotion = (*activeScript)[currentLine].emotion;