remove hardcoded node references in favor of exported properties
This commit is contained in:
@@ -10,6 +10,13 @@ const MARKER_RADIUS: float = 0.2
|
||||
const CIRCLE_RADIUS: float = 3
|
||||
const DEFAULT_COLOR: Color = Color.RED
|
||||
|
||||
@export_group("References")
|
||||
@export var _control: Control
|
||||
@export var _label1: RichTextLabel
|
||||
@export var _label2: RichTextLabel
|
||||
@export var _label3: RichTextLabel
|
||||
@export var _label4: RichTextLabel
|
||||
|
||||
var mode: Mode = Mode.PERFORMANCE
|
||||
|
||||
var _vectors_to_draw: Dictionary = {}
|
||||
@@ -23,12 +30,6 @@ var _label1_text: String = ""
|
||||
var _label2_text: String = ""
|
||||
var _label3_text: String = ""
|
||||
|
||||
@onready var _control: Control = $Control
|
||||
@onready var _label1: RichTextLabel = $Control/LabelContainer1/Label1
|
||||
@onready var _label2: RichTextLabel = $Control/LabelContainer2/Label2
|
||||
@onready var _label3: RichTextLabel = $Control/LabelContainer3/Label3
|
||||
@onready var _label4: RichTextLabel = $Control/LabelContainer4/Label4
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
assert(_control, str(self) + ": _control missing!")
|
||||
|
||||
Reference in New Issue
Block a user