diff --git a/internal/pkg/server/wwwdata/index.html b/internal/pkg/server/wwwdata/index.html index 5a2a3fc4..7c5be794 100644 --- a/internal/pkg/server/wwwdata/index.html +++ b/internal/pkg/server/wwwdata/index.html @@ -82,6 +82,7 @@ selectionState.img.y1 = -1 document.querySelector("#rectOptions").innerHTML = "" + document.querySelector("#rectOptionsEnv").innerHTML = "" selectionState.active = true } else { selectionState.rect.x1 = event.layerX @@ -106,7 +107,20 @@ selectionState.img.x1 - selectionState.img.x0, selectionState.img.y1 - selectionState.img.y0 ] - document.querySelector("#rectOptions").innerHTML = `-X ${Math.round(x)} -Y ${Math.round(y)} -W ${Math.round(w)} -H ${Math.round(h)}` + + const rounded = { + x: Math.round(x), + y: Math.round(y), + w: Math.round(w), + h: Math.round(h), + } + + document.querySelector("#rectOptions").innerHTML = `-X ${rounded.x} -Y ${rounded.y} -W ${rounded.w} -H ${rounded.h}` + document.querySelector("#rectOptionsEnv").innerHTML = +`RECT_X=${rounded.x} +RECT_Y=${rounded.y} +RECT_W=${rounded.w} +RECT_H=${rounded.h}` selectionState.active = false } @@ -164,6 +178,7 @@

Trainbot Confighelper


+