diff --git a/js/main-editor.js b/js/main-editor.js index 8ef4302..c7e0e93 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -3255,7 +3255,8 @@ export class Editor extends PrimaryView { // Populate status bar (needs doing before the mouse stuff, which tries to update it) let statusbar = this.root.querySelector('#editor-statusbar'); this.statusbar_zoom = mk('div.-zoom'); - statusbar.append(this.statusbar_zoom); + this.statusbar_cursor = mk('div.-mouse', "—"); + statusbar.append(this.statusbar_zoom, this.statusbar_cursor); // Keyboard shortcuts window.addEventListener('keydown', ev => { @@ -3395,9 +3396,12 @@ export class Editor extends PrimaryView { this.svg_cursor.classList.add('--visible'); this.svg_cursor.setAttribute('x', x); this.svg_cursor.setAttribute('y', y); + + this.statusbar_cursor.textContent = `(${x}, ${y})`; } else { this.svg_cursor.classList.remove('--visible'); + this.statusbar_cursor.textContent = `—`; } if (! this.mouse_op) diff --git a/style.css b/style.css index 3cb9352..64b63bd 100644 --- a/style.css +++ b/style.css @@ -2012,7 +2012,17 @@ body.--debug #player-debug { #editor #editor-statusbar { grid-area: status; display: flex; - height: 1em; + gap: 0.5em; + /* Try very hard to minimize reflow, since this is updated frequently */ + height: 1.25em; + line-height: 1.25; + overflow: hidden; +} +#editor #editor-statusbar > .-zoom { + width: 4em; +} +#editor #editor-statusbar > .-cursor { + width: 5em; } .editor-level-browser {