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;