Language selection.

Gulpfile
This commit is contained in:
firebingo 2018-04-21 12:53:55 -07:00
parent 5b5f3d83c2
commit 5ed031cb6a
9 changed files with 135 additions and 32 deletions

View file

@ -8,12 +8,13 @@ class TextFunctions {
this.dialogBox = undefined;
this.character = undefined;
this.dialog = undefined;
this.textScrollSpeedMs = 35;
this.scrollControls = undefined;
this.nextIndicator = undefined;
this.dialogToDisplay = {timeout: undefined, fullText: "", text: "", curPos: 0};
this.textScrollSpeedMs = 40;
this.scrollingText = false;
this.lineHeight = -1;
this.textHistory = [];
}
findTextElements() {
@ -67,6 +68,7 @@ class TextFunctions {
} else {
this.dialogToDisplay.text = text;
this.dialogToDisplay.fullText = text;
this.textHistory.push({ character: this.character.innerHTML, text: text });
this.dialogToDisplay.curPos = 0;
this.dialogInner.innerHTML = "";
//this.dialogInner.innerHTML = this.dialogToDisplay.text[0];
@ -180,5 +182,12 @@ class TextFunctions {
this.dialogBox.classList.add('hidden');
this.scrollControls.classList.add('hidden');
this.nextIndicator.classList.add('hidden');
this.textHistory.length = 0;
if(this.dialogToDisplay.timeout) {
clearTimeout(this.dialogToDisplay.timeout);
}
this.dialogToDisplay = {timeout: undefined, fullText: "", text: "", curPos: 0};
this.scrollingText = false;
this.lineHeight = -1;
}
}