added a working song next action to the slide object
This commit is contained in:
parent
f4d034fe7c
commit
c1410781c9
3 changed files with 59 additions and 28 deletions
|
@ -158,30 +158,41 @@ Item {
|
|||
}
|
||||
|
||||
function nextSlideAction() {
|
||||
print(textIndex);
|
||||
if (itemType === "song") {
|
||||
if (textIndex === 0) {
|
||||
SlideObject.setText(root.text[textIndex]);
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else if (textIndex < root.text.length) {
|
||||
SlideObject.setText(root.text[textIndex]);
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else {
|
||||
print("Next slide time");
|
||||
textIndex = 0;
|
||||
clearText();
|
||||
nextSlide();
|
||||
}
|
||||
} else if (itemType === "video") {
|
||||
/* clearText(); */
|
||||
nextSlide();
|
||||
}
|
||||
else if (itemType === "image") {
|
||||
/* clearText(); */
|
||||
nextSlide();
|
||||
const nextServiceItemIndex = currentServiceItem + 1;
|
||||
const nextItem = serviceItemModel.getItem(nextServiceItemIndex);
|
||||
print("currentServiceItem " + currentServiceItem);
|
||||
print("nextServiceItem " + nextServiceItemIndex);
|
||||
print(nextItem.name);
|
||||
const changed = SlideObject.next(nextItem);
|
||||
print(changed);
|
||||
if (changed) {
|
||||
currentServiceItem++;
|
||||
loadVideo();
|
||||
}
|
||||
/* print(textIndex); */
|
||||
/* if (itemType === "song") { */
|
||||
/* if (textIndex === 0) { */
|
||||
/* SlideObject.setText(root.text[textIndex]); */
|
||||
/* print(root.text[textIndex]); */
|
||||
/* textIndex++; */
|
||||
/* } else if (textIndex < root.text.length) { */
|
||||
/* SlideObject.setText(root.text[textIndex]); */
|
||||
/* print(root.text[textIndex]); */
|
||||
/* textIndex++; */
|
||||
/* } else { */
|
||||
/* print("Next slide time"); */
|
||||
/* textIndex = 0; */
|
||||
/* clearText(); */
|
||||
/* nextSlide(); */
|
||||
/* } */
|
||||
/* } else if (itemType === "video") { */
|
||||
/* /\* clearText(); *\/ */
|
||||
/* nextSlide(); */
|
||||
/* } */
|
||||
/* else if (itemType === "image") { */
|
||||
/* /\* clearText(); *\/ */
|
||||
/* nextSlide(); */
|
||||
/* } */
|
||||
}
|
||||
|
||||
function nextSlide() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue