-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically allocate selection commands
I'm not going to lie, this is pretty cool. Last week, I made the fomod selection logic into its own controller so we could re-use the UI. As a consequence, we were no longer able to use `<index>` to change fomod selections, and were stuck using the cumbersome `select <index>`. It's also worth mentioning here that something like this will not be allowed (obviously): def 0(): # function named after a number?! Make the fomod controller create a method named after an integer for each index associated with a possible fomod selection. Executing the command will toggle the associated fomod selection. To top it all off, they get populated into the help menu with a description named after the option they will change. This can get kind of long depending on the mod, but it keeps things so that the UI doesn't have to know anything about the controller, and the controller doesn't have to know anything about the UI.
- Loading branch information
1 parent
2bc9c61
commit 2c1bc3c
Showing
2 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters