Advance indicator
This commit is contained in:
@@ -29,6 +29,7 @@ var _advancementMode:AdvancementMode = AdvancementMode.PLAYER
|
||||
|
||||
@onready var _speakerLabel:Label = $VBoxContainer/SpeakerLabel
|
||||
@onready var _bodyLabel:RichTextLabel = $VBoxContainer/BodyLabel
|
||||
@onready var _advanceIndicator:Label = $VBoxContainer/AdvanceIndicator
|
||||
|
||||
func _ready() -> void:
|
||||
size.x = MAX_WIDTH
|
||||
@@ -63,6 +64,9 @@ func _process(delta:float) -> void:
|
||||
return
|
||||
|
||||
_updateWorldPosition()
|
||||
_advanceIndicator.visible = _isWaitingForInput
|
||||
if _isWaitingForInput:
|
||||
_advanceIndicator.modulate.a = 0.5 + 0.5 * sin(Time.get_ticks_msec() / 300.0)
|
||||
|
||||
if _isRevealing:
|
||||
_processReveal(delta)
|
||||
@@ -151,6 +155,8 @@ func _processAutoAdvance(delta:float) -> void:
|
||||
_advance()
|
||||
|
||||
func _advance() -> void:
|
||||
_advanceIndicator.visible = false
|
||||
_advanceIndicator.modulate.a = 1.0
|
||||
var hasMorePages:bool = _startLine + _linesPerPage < _bodyLabel.get_line_count()
|
||||
if hasMorePages:
|
||||
_startLine += _linesPerPage
|
||||
|
||||
Reference in New Issue
Block a user