mach icon indicating copy to clipboard operation
mach copied to clipboard

Support multiple windows on desktop platforms only

Open emidoots opened this issue 3 years ago • 4 comments

I'd like to support multiple windows on desktop platforms (e.g. for the editor to have breakout windows that dock/undock if you drag'n'drop a window onto the main one.)

Of course, multiple windows will not work on most other platforms (at least mobile, consoles, etc.) - WASM would be nice-to-have.

emidoots avatar Sep 14 '22 19:09 emidoots

Here's a starting point perhaps?

  • Add Core.createWindow, it returns a new *Window type (which I imagine would largely have identical fields to Core today.)
  • Add Window.setOptions, Window.setShouldClose, Window.getFramebufferSize, Window.getSize, Window.close

Then inside your app's pub fn init or pub fn update you could call this API to create a new window and render to it.

emidoots avatar Sep 14 '22 20:09 emidoots