-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved menu closing #294
Conversation
…ed OnKeyPress to utilise the GetActiveMenu function and added the .Close() function to a base menu instance
It might be easier to add a parameter, like |
…close the menu on select.
To fix the API compatibility issues you would need to: define the 3rd parameter not as optional, but as an overloaded method (since optional params are a compile time thing), i.e. instead of You also need to provide a default implementation for |
Converted this back to a draft because I'm not happy with implementing the |
…ey would like to use
I opted to use a PostSelectAction enum instead: public enum PostSelectAction
{
Close,
Reset,
Nothing
} How it looks to people using a menu in a plugin: menu.PostSelectAction = PostSelectAction.Close; |
Allow plugins to close the active menu in the MenuManager, also updated OnKeyPress to utilise the GetActiveMenu function and added the .Close() function to a base menu instance