Godot Version
4.3
Question
`Hey everyone,
I’m working on a note-taking app in Godot, and I’m trying to get it to run on top of other windows with a transparent background. However, I’m running into a weird issue where the app keeps flashing, and it’s causing all my open webpages to bug out. I’ve been searching everywhere for a solution but haven’t found anything helpful yet.`
here is my code :
extends Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
_process_clickables()
pass
func _process_clickables() -> void:
var clickable_nodes = get_tree().get_nodes_in_group("Clickables")
for node in clickable_nodes:
if node is Control:
var rect = node.get_rect() as Rect2
var texture_corners: PackedVector2Array = [
rect.position, # Top left corner
rect.position + Vector2(rect.size.x, 0), # Top right corner
rect.position + rect.size, # Bottom right corner
rect.position + Vector2(0, rect.size.y) # Bottom left corner
]
DisplayServer.window_set_mouse_passthrough(texture_corners)
else:
printerr(node.name + " is not a Control")