Created DebugDraw

Created debug draw to get drawing of exception areas for mouse
passthrough.
This commit is contained in:
Mario Steele 2026-02-26 14:36:06 -06:00
parent 3d10309681
commit e055de131f
2 changed files with 21 additions and 0 deletions

20
lib/debug_draw.gd Normal file
View file

@ -0,0 +1,20 @@
extends Node2D
class_name DebugDraw
var points: PackedVector2Array
func _draw() -> void:
points = Globals.get_exception_points()
var i := 0
while i < points.size():
var slice := points.slice(i, i+4)
draw_line(slice[0], slice[1], Color.GREEN, 1.0, true)
draw_line(slice[1], slice[2], Color.GREEN, 1.0, true)
draw_line(slice[2], slice[3], Color.GREEN, 1.0, true)
draw_line(slice[3], slice[0], Color.GREEN, 1.0, true)
i += 4
func _process(_d: float) -> void:
var current := Globals.get_exception_points()
if current != points:
queue_redraw()

1
lib/debug_draw.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://dnmdryl8p663n