adding a nextSlideAction instead of nextSlideText to allow for other types
This commit is contained in:
parent
366660dcb2
commit
2e72a01c6f
4 changed files with 24 additions and 16 deletions
|
@ -104,7 +104,7 @@ Item {
|
|||
Layout.alignment: Qt.AlignLeft
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: nextSlideText()
|
||||
onPressed: nextSlideAction()
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
|
@ -122,20 +122,25 @@ Item {
|
|||
previewSlide.loadVideo();
|
||||
}
|
||||
|
||||
function nextSlideText() {
|
||||
if (textIndex === 0) {
|
||||
previewSlide.text = root.text[textIndex];
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else if (textIndex < root.text.length) {
|
||||
previewSlide.text = root.text[textIndex];
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else {
|
||||
print("Next slide time");
|
||||
function nextSlideAction() {
|
||||
if (itemType === "song") {
|
||||
if (textIndex === 0) {
|
||||
previewSlide.text = root.text[textIndex];
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else if (textIndex < root.text.length) {
|
||||
previewSlide.text = root.text[textIndex];
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else {
|
||||
print("Next slide time");
|
||||
textIndex = 0;
|
||||
nextSlide();
|
||||
}
|
||||
} else if (itemType === "video")
|
||||
nextSlide();
|
||||
else if (itemType === "image")
|
||||
nextSlide();
|
||||
textIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function nextSlide() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue