Advance indicator
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user