Moved files into folders

This commit is contained in:
2026-03-16 09:03:31 +11:00
parent b433c31261
commit 8b304304db
9 changed files with 7 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
class_name DialogText extends Resource
##Contains raw text for dialog boxes, and allows you to iterate through it line-by-line.
@export_multiline() var text: String
var _content: Array = []
func get_line_raw(line: int) -> String:
if _content.size() == 0 and text.length() > 0:
_parse_text()
if line >= _content.size():
return ""
return _content[line]
func get_line_count() -> int:
if _content.size() == 0 and text.length() > 0:
_parse_text()
return _content.size()
func _parse_text() -> void:
_content = Array(text.split("\n")).filter(func(line): return line.length() > 0)