Closed ericoporto closed 4 months ago
I propose to name it simply "Global Messages", and move to the bottom of the separated group (after "Restore all sprites"), as it's the least useful of these.
Redid as following
If at some point in the future new actions post old-game import appear, we could rename this menu to something like "Legacy Project Post-Upgrade Actions" or some short version of it.
I confirm that submenu works as expected, but I think this system may be expanded to allow nested submenus (submenus in submenus), if you pick out menu item registration / addition into helper function(s) that is called recursively over SubCommands.
I am not 100% sure, but I think I figured how to support it recursively to register the submenus. I am not completely sure because there are a few dictionaries in things like AddMenuCommandGroup
and RemoveMenuCommandGroup
I am not completely sure how it's supposed to work.
I think it's working right.
I am not completely sure because there are a few dictionaries in things like AddMenuCommandGroup and RemoveMenuCommandGroup
I quickly checked that out, and these dictionaries store MenuCommands objects in a list mapped to a key "menu name". All the items and submenus are stored internally inside MenuCommands, so should not affect these dicts.
This is the minimal amount of code I could think that give support to submenus. The other approach would be to make the property read-only and then make so you can only pass such list in Constructor - which would make it more similar to the other properties.
I noticed the following todo:
Decided to try to fix it. Not sure on the name of the group as "Global Messages upgrade".