2023-12-15 22:44:25 +01:00
|
|
|
# (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)
|
2023-06-10 19:13:16 +02:00
|
|
|
extends DeckNode
|
|
|
|
|
|
|
|
|
|
|
|
func _init() -> void:
|
2023-07-21 07:30:12 +02:00
|
|
|
name = "Button"
|
|
|
|
node_type = "button"
|
2023-12-15 22:44:25 +01:00
|
|
|
description = "A button to trigger certain nodes that have a trigger input."
|
2023-07-21 07:30:12 +02:00
|
|
|
|
2024-03-06 08:50:23 +01:00
|
|
|
var port := add_output_port(
|
|
|
|
DeckType.Types.ANY,
|
2023-06-10 19:13:16 +02:00
|
|
|
"Press me",
|
2024-03-06 08:50:23 +01:00
|
|
|
"button",
|
|
|
|
Port.UsageType.TRIGGER,
|
2023-06-10 19:13:16 +02:00
|
|
|
)
|
2024-03-06 08:50:23 +01:00
|
|
|
|
|
|
|
port.button_pressed.connect(send.bind(port.index_of_type, null))
|