You can't use it in this way ;) (see below)

Created window can register events or tasks.

If you create both map and settlement windows, you have only one window
visible, but the second window is in background doing its work. We don't
want it.
Just a space
Removed tab and memory leak
Added todo suggestion
Battle popup working on