mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
c7e003ffe6
closes #60 Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/74 Co-authored-by: Lera Elvoé <yagich@poto.cafe> Co-committed-by: Lera Elvoé <yagich@poto.cafe>
21 lines
580 B
GDScript
21 lines
580 B
GDScript
# meta-description: An empty template with StreamGraph license header.
|
|
# (c) 2023-present Eroax
|
|
# (c) 2023-present Yagich
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
extends DescriptorContainer
|
|
|
|
@onready var button: Button = %Button
|
|
|
|
|
|
func _setup(port: Port, node: DeckNode) -> void:
|
|
button.text = port.label
|
|
if port.port_type == DeckNode.PortType.OUTPUT:
|
|
button.pressed.connect(
|
|
func():
|
|
node.send(port.index_of_type, true)
|
|
)
|
|
else:
|
|
button.pressed.connect(
|
|
func():
|
|
node._receive(port.index_of_type, true)
|
|
)
|