StreamOverlay/lib/debug_draw.gd
Mario Steele e055de131f Created DebugDraw
Created debug draw to get drawing of exception areas for mouse
passthrough.
2026-02-26 14:36:06 -06:00

20 lines
561 B
GDScript

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()