Add pausing
This commit is contained in:
@@ -16,6 +16,7 @@ var currentLine = 0;
|
||||
var currentViewScrolled = true;
|
||||
var isSpeedupDown = false;
|
||||
var isMoreViews = false;
|
||||
var isClosed = true;
|
||||
|
||||
func _ready() -> void:
|
||||
label = $MarginContainer/Label
|
||||
@@ -32,7 +33,8 @@ func _process(delta: float) -> void:
|
||||
currentViewScrolled = false;
|
||||
recalculateWrapping();
|
||||
return
|
||||
print("End of view");
|
||||
isClosed = true;
|
||||
setText("");
|
||||
return;
|
||||
|
||||
if visibleCharacters >= getCountOfCharactersToScrollInView():
|
||||
@@ -104,6 +106,12 @@ func recalculateWrapping():
|
||||
|
||||
func setText(text:String) -> void:
|
||||
self.text = text;
|
||||
if text == "":
|
||||
isClosed = true;
|
||||
label.text = "closed.";
|
||||
return;
|
||||
|
||||
isClosed = false;
|
||||
revealTimer = 0;
|
||||
visibleCharacters = 0;
|
||||
currentLine = 0;
|
||||
|
Reference in New Issue
Block a user