Browse Source

Past line function added

main
Cailean 4 weeks ago
parent
commit
a8564e76e8
  1. 6
      src/ofTeleprompter.cpp

6
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;

Loading…
Cancel
Save