I'm writing a cross-platform SwiftUI-based app that lets users create different types of "screens". It's a word puzzle helper. You can create screens to help solve Wordle puzzles, Anagrams, or crossword puzzle like puzzles.
Right now it uses a TabView on each window, and users can switch between tabs. However, that causes some problems, and I've concluded that for the macOS version of the app I instead want to let the user create new Wordle, Anagram, or Crossword windows.
Adding a WindowGroup to my app lets me create windows of that type from the File menu's "New Window" command.
The Window(_:, id:) struct defines a single instance of a window. If you use the openWindow(id:) action, it opens a "singleton" of that window. Users can't open multiple instances of a Window() with a specific ID.
How would I go about adding "New Wordle Window", "New Anagrams Window" and "New Crosswords Window" menu items to the file menu, so that each time the user selects that menu item it creates a new instance of that type of Window?
(For the iOS version of my app I may keep the tabbed approach where users can switch between single instances of a Wordle, Anagram, and Crosswords screen via a TabView.)
