diff --git a/index.html b/index.html index f4a1e80..213b1e9 100644 --- a/index.html +++ b/index.html @@ -7,9 +7,9 @@ - - - + + +
diff --git a/js/world/gameMode.js b/js/world/gameMode.js index c4f25b4..adeb6ed 100644 --- a/js/world/gameMode.js +++ b/js/world/gameMode.js @@ -300,9 +300,11 @@ function showWorldUI() { canvas.style.cursor = 'default'; } - // Show back-to-world button (hidden since we're IN world) + // Hide game buttons (we're IN world, not workshop) const backBtn = document.getElementById('back-to-world-btn'); if (backBtn) backBtn.style.display = 'none'; + const saveBtn = document.getElementById('save-gadget-btn'); + if (saveBtn) saveBtn.style.display = 'none'; } function hideWorldUI() { @@ -319,19 +321,27 @@ function showWorkshopUI() { canvas.style.cursor = 'default'; } - // Show back-to-world button and save-gadget button - const backBtn = document.getElementById('back-to-world-btn'); - if (backBtn) backBtn.style.display = 'flex'; + // Move game buttons into toolbar-right so they sit inline with Export/Import + const toolbarRight = document.querySelector('.toolbar-right'); const saveBtn = document.getElementById('save-gadget-btn'); - if (saveBtn) saveBtn.style.display = 'flex'; + const backBtn = document.getElementById('back-to-world-btn'); + if (toolbarRight && saveBtn) { + toolbarRight.insertBefore(saveBtn, toolbarRight.firstChild); + saveBtn.style.display = 'inline-block'; + } + if (toolbarRight && backBtn) { + toolbarRight.insertBefore(backBtn, toolbarRight.firstChild); + backBtn.style.display = 'inline-block'; + } } function hideWorkshopUI() { const toolbar = document.getElementById('toolbar'); if (toolbar) toolbar.style.display = 'none'; + // Hide game buttons and move them back out of toolbar const backBtn = document.getElementById('back-to-world-btn'); - if (backBtn) backBtn.style.display = 'none'; + if (backBtn) { backBtn.style.display = 'none'; document.body.insertBefore(backBtn, document.body.firstChild); } const saveBtn = document.getElementById('save-gadget-btn'); - if (saveBtn) saveBtn.style.display = 'none'; + if (saveBtn) { saveBtn.style.display = 'none'; document.body.insertBefore(saveBtn, document.body.firstChild); } }