gd-wireportal-full/learning-rust4.4/root.gd
2025-03-18 12:02:06 +01:00

16 lines
446 B
GDScript

extends Node2D
func _on_button_pressed() -> void:
print("Starting request in godot")
await $ScreencastRunner.request_capture()
print("awaiting result")
await $ScreencastRunner.screencast_result
func _on_screencast_runner_screencast_failure(reason: String) -> void:
push_warning("Screencast failed, ", reason)
func _on_screencast_runner_screencast_sucess(pipewire_node_id: int) -> void:
print("Screencast success: ", pipewire_node_id)