This commit is contained in:
33333-33333 2026-06-26 12:46:32 +09:00
commit 86226ccc94
97 changed files with 5790 additions and 2307 deletions

View file

@ -125,12 +125,13 @@ function resizeFieldFromWheel(e) {
}
function selectTool(tool) {
world.tool = tool;
const result = window.TarinaiCommands?.dispatch?.(world, { type: "tool.select", toolId: tool });
const activeTool = result?.toolId || world.tool || tool;
for (const btn of uiCache.toolButtons) {
btn.classList.toggle("selected", btn.dataset.tool === tool);
btn.classList.toggle("selected", btn.dataset.tool === activeTool);
}
syncToolSizeBadges();
canvas.style.cursor = tool === "observe" ? "default" : (tool === "pinch" ? "grab" : (tool === "poke" || tool === "delete" ? "pointer" : "crosshair"));
canvas.style.cursor = activeTool === "observe" ? "default" : (activeTool === "pinch" ? "grab" : (activeTool === "poke" || activeTool === "delete" ? "pointer" : "crosshair"));
}
function showToast(text) {