WIP: tabs, docking, dragdrop, settings, logging, harness

This commit is contained in:
4DBug
2026-10-08 05:35:25 -05:00
parent 693ced0511
commit fee9a84902
26 changed files with 128896 additions and 1836 deletions
+9 -3
View File
@@ -13,7 +13,7 @@ for dp, _, fn in os.walk(SRC):
if f.endswith(".lua"):
FILES[f] = open(os.path.join(dp, f)).read()
ENTRY = ["imgui.lua", "imgui_impl_roblox.lua", "imgui_demo.lua"] # run order
ENTRY = ["imgui.lua", "imgui_impl_roblox.lua"] + sorted(f for f in FILES if f.startswith("imgui_demo")) # run order
names = set()
for src in FILES.values():
@@ -27,8 +27,10 @@ out = ["--!native", "--!optimize 2", "-- GENERATED by tools/bundle.py from imgui
" if r == nil then r = __FILES[name](); if r == nil then r = true end; __LOADED[name] = r end",
" return r",
"end", ""]
linemap = [] # (first bundle line, file) for error -> source mapping (tools/test/run.py)
for name, src in sorted(FILES.items()):
out.append("__FILES[%r] = function()" % name)
linemap.append((sum(x.count("\n") + 1 for x in out) + 1, name))
out.append(src.rstrip("\n"))
out.append("end")
out.append("")
@@ -40,6 +42,10 @@ for n in sorted(names):
out.append(" %s = %s," % (n, n))
out.append("}")
os.makedirs(os.path.join(ROOT, "build"), exist_ok=True)
open(os.path.join(ROOT, "build", "ImGui.luau"), "w").write("\n".join(out) + "\n")
import sys
OUT = sys.argv[1] if len(sys.argv) > 1 else os.path.join(ROOT, "build")
os.makedirs(OUT, exist_ok=True)
open(os.path.join(OUT, "ImGui.luau"), "w").write("\n".join(out) + "\n")
import json
json.dump(linemap, open(os.path.join(OUT, "ImGui.linemap.json"), "w"))
print("wrote build/ImGui.luau (%d files, %d exports)" % (len(FILES), len(names)))