adding text to the SlideObject

This commit is contained in:
Chris Cochrun 2022-07-13 14:28:51 -05:00
parent 51f8488089
commit 25b07dbab9
5 changed files with 29 additions and 17 deletions

View file

@ -138,12 +138,13 @@ Controls.Page {
presentation.loadVideo()
}
print(item.text.length)
print("text length: " + item.text.length);
print("text: " + item.text);
if (item.text.length === 0) {
presentation.text = [""];
SlideObject.setText("");
}
else
presentation.text = item.text;
SlideObject.setText(item.text);
presentation.textIndex = 0;
presentation.changeSlide();

View file

@ -135,15 +135,15 @@ Item {
} else {
print("Next slide time");
textIndex = 0;
clearText();
/* clearText(); */
nextSlide();
}
} else if (itemType === "video") {
clearText();
/* clearText(); */
nextSlide();
}
else if (itemType === "image") {
clearText();
/* clearText(); */
nextSlide();
}
}
@ -157,7 +157,7 @@ Item {
print(textIndex);
if (itemType === "song") {
if (textIndex === 0) {
clearText();
/* clearText(); */
nextSlide();
} else if (textIndex <= root.text.length) {
previewSlide.text = root.text[textIndex];
@ -165,11 +165,11 @@ Item {
--textIndex;
}
} else if (itemType === "video") {
clearText();
/* clearText(); */
previousSlide();
}
else if (itemType === "image") {
clearText();
/* clearText(); */
previousSlide();
}
}
@ -185,14 +185,14 @@ Item {
print(root.text[textIndex]);
textIndex++;
} else if (itemType === "video") {
clearText();
/* clearText(); */
}
else if (itemType === "image") {
clearText();
/* clearText(); */
}
}
function clearText() {
previewSlide.text = "";
}
/* function clearText() { */
/* previewSlide.text = ""; */
/* } */
}

View file

@ -28,6 +28,14 @@ Window {
videoSource: SlideObject.videoBackground
text: SlideObject.text
Component.onCompleted: slideItem = presentationSlide
/* Component.onCompleted: slideItem = presentationSlide */
}
function loadVideo() {
presentationSlide.loadVideo();
}
function stopVideo() {
presentationSlide.stopVideo()
}
}