Advance indicator

This commit is contained in:
2026-06-12 11:59:15 -05:00
parent 2f3a4eab66
commit 96141e48a2
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -29,6 +29,7 @@ var _advancementMode:AdvancementMode = AdvancementMode.PLAYER
@onready var _speakerLabel:Label = $VBoxContainer/SpeakerLabel @onready var _speakerLabel:Label = $VBoxContainer/SpeakerLabel
@onready var _bodyLabel:RichTextLabel = $VBoxContainer/BodyLabel @onready var _bodyLabel:RichTextLabel = $VBoxContainer/BodyLabel
@onready var _advanceIndicator:Label = $VBoxContainer/AdvanceIndicator
func _ready() -> void: func _ready() -> void:
size.x = MAX_WIDTH size.x = MAX_WIDTH
@@ -63,6 +64,9 @@ func _process(delta:float) -> void:
return return
_updateWorldPosition() _updateWorldPosition()
_advanceIndicator.visible = _isWaitingForInput
if _isWaitingForInput:
_advanceIndicator.modulate.a = 0.5 + 0.5 * sin(Time.get_ticks_msec() / 300.0)
if _isRevealing: if _isRevealing:
_processReveal(delta) _processReveal(delta)
@@ -151,6 +155,8 @@ func _processAutoAdvance(delta:float) -> void:
_advance() _advance()
func _advance() -> void: func _advance() -> void:
_advanceIndicator.visible = false
_advanceIndicator.modulate.a = 1.0
var hasMorePages:bool = _startLine + _linesPerPage < _bodyLabel.get_line_count() var hasMorePages:bool = _startLine + _linesPerPage < _bodyLabel.get_line_count()
if hasMorePages: if hasMorePages:
_startLine += _linesPerPage _startLine += _linesPerPage
+6
View File
@@ -25,3 +25,9 @@ size_flags_vertical = 3
bbcode_enabled = true bbcode_enabled = true
scroll_active = true scroll_active = true
autowrap_mode = 3 autowrap_mode = 3
[node name="AdvanceIndicator" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "▼"
horizontal_alignment = 2
visible = false