2023-06-10 19:13:16 +02:00
|
|
|
class_name Port
|
|
|
|
|
|
|
|
var type: Deck.Types
|
|
|
|
var label: String
|
|
|
|
var descriptor: String
|
2023-06-10 20:23:57 +02:00
|
|
|
var value_callback: Callable
|
2023-06-10 19:13:16 +02:00
|
|
|
|
2023-06-12 17:32:16 +02:00
|
|
|
var port_type: DeckNode.PortType
|
|
|
|
var index_of_type: int
|
|
|
|
var index: int
|
|
|
|
|
2023-07-21 10:26:43 +02:00
|
|
|
var value: Variant: set = set_value
|
|
|
|
|
2023-06-10 19:13:16 +02:00
|
|
|
|
2023-06-10 20:23:57 +02:00
|
|
|
func _init(
|
|
|
|
p_type: Deck.Types,
|
|
|
|
p_label: String,
|
2023-06-12 17:32:16 +02:00
|
|
|
p_index: int,
|
|
|
|
p_port_type: DeckNode.PortType,
|
|
|
|
p_index_of_type: int,
|
2023-06-10 20:23:57 +02:00
|
|
|
p_descriptor: String = "",
|
2023-06-12 17:32:16 +02:00
|
|
|
# p_value_callback: Callable = Callable(),
|
|
|
|
) -> void:
|
2023-06-10 19:13:16 +02:00
|
|
|
type = p_type
|
|
|
|
label = p_label
|
|
|
|
descriptor = p_descriptor
|
2023-06-12 17:32:16 +02:00
|
|
|
# value_callback = p_value_callback
|
|
|
|
|
|
|
|
port_type = p_port_type
|
|
|
|
index_of_type = p_index_of_type
|
|
|
|
index = p_index
|
2023-07-21 10:26:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
func set_value(v: Variant) -> void:
|
|
|
|
value = v
|