Inspector now just takes a name

This commit is contained in:
Dustin Swan 2026-04-06 21:07:35 -06:00
parent 22c74bac85
commit a88a4fb764
No known key found for this signature in database
GPG key ID: 30D46587E2100467
2 changed files with 15 additions and 19 deletions

View file

@ -1,19 +0,0 @@
inspector = config \
{
width = 600,
view = ctx \
val = eval! config.name;
reflected = val
| Value v \ reflect v
| _ \ reflect 0;
textInputHeight = 40;
tree {
value = reflected,
path = [config.name],
w = ctx.w,
h = ctx.h - textInputHeight
}
};

15
src/cg/inspector.cg Normal file
View file

@ -0,0 +1,15 @@
inspector = name \ {
width = 600,
view = ctx \
val = eval! name;
reflected = val
| (Value v) \ reflect v
| _ \ reflect 0;
textInputHeight = 40;
tree {
value = reflected,
path = [name],
w = ctx.w,
h = ctx.h - textInputHeight
}
};