How to create multiple window?

I’m trying to have some kinda browse for files, but when I try to create a new App instance for new window hashlink stuck in a loop that I can’t debug correctly.

Any Ideas?

this is what I’v been able to achieve until now:

@:access(hxd.Window)
@:access(h3d.Engine)
class FileBrowserApp extends App {
    public function new() {
        super();
        System.start(function() {
            this.setCurrent();
        });
    }

    @:access(hxd.Window)
    override function init() {
        this.engine.backgroundColor = 0xffff0000;
    }
}

But this is unsafe window, which can not be accessed by Signals and I can not close it and return to parent Window.

This is quite tricky, but feasible. Hide uses multiple contexts, but it’s only be tested on JS target so far. First you need to compile with -D multidriver , then you need a specific Engine / Window per hxd.App, which has not been designed for this, so you might want to copy/paste hxd.App in order to create two windows and two Engine, and make sure to switch between the two for each render.

Beware again that this just theory, I haven’t tested it and while it should work there might be some bugs that requires fixing before it can work perfectly.