Still in progress but wanted to get some feedback from @rswindell and @echicken. I can still post in programming on DoveNet if you'd like, but I thought this WIP merge request would be a great way to see the code, comment on it, etc.
This is a rewrite of xtrn_sec.js and related files that optionally allows setting custom external program menus. My original need for this is to allow many levels of external section menus such that I can categorize the games by genre, author, system type, league vs local, etc. The custom menus can be any number of levels and the items within the menus can point to other custom menus, to external program sections, or external programs (mix and match even). There are a number of sorting, formatting, etc. options which allows customization of the menus and highlighting of specific items, etc. The custom menus allow custom input keys as well. There are also some small features like the ability to ask for confirmation before entering a door (good for after they read the intro *.ANS file).
I've tried to make this an opt-in feature so unless the user creates the json config file, the system should act like it did before, with the exception of webv4 which presents doors in 2 hierarchy instead of every door on the main index (so it more mimics the forum web nav)
The files I have done so far are:
- xtrn_sec.js - most of the logic for presenting the terminal menus
- xtrnmenulib.js - library
- logon.js - makes it use all the normal xtrn_sec.js options so for example, logging into a door from web interface will support pausing, displaying *.ANS files, etc. now
- xtrnmenucfg.js - UIFC editor to create the custom menus
- 003-games.xjs - updated webv4 module to support the custom menus
- xtrnmenucfg.txt - start of readme/documentation/wiki
- Update lbshell.js light shell to support custom menus
- Look into a way of preserving the selected menu item/screen position when copying/pasting items, instead of throwing cursor to top
- Possibly add an option to the editor to import external programs into a custom menu. This would allow you to make a duplicate of the normal section menu and be able to customize it 100%...at the expense of no longer automatically making the list (so you would have to manually add/remove games from the menu in the future). Another possibility is to allow creating an overlay of config/item changes that would be merged/applied over the default section program list...but this would be a bit more complicated
- Add "cost" support to the webv4 and lightshell (not sure if anyone would even need this...)
- Possibly add an alternative to the *.ANS info/intro screen that would use templating and an INI file to inject per-game data into the screen