-
Notifications
You must be signed in to change notification settings - Fork 177
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
PluginActions for connecting/disconnecting a session #537
PluginActions for connecting/disconnecting a session #537
Conversation
Support for this! Would love to see merged. As an extra convenience - perhaps an option in the Rojo settings that would create a PluginToolbarButton button on the Toolbar specifically for starting and stopping without having to open the full menu (?) |
@unix-system What would the button offer over the keybind? I personally almost never have the Plugin ribbon open on top, because I need to access the other buttons in ribbons like Script and Test. |
@boatbomber Mostly a preference thing. For better or worse, I don't really use keybinds often in Studio. So assuming that's true for other users too, this would reduce the number of clicks required for me to start or stop Rojo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, a couple comments and then we should be good to go!
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
…ber/rojo into plugin-action-connection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
* Create plugin action component * Add plugin action for session start/end * Add output for connection status change * Move host & port refs to App level so keybind can access them * Use passed function directly * Improve the action text clarity * Add actions for single action * Add to changelog * Explicitly return nil Co-authored-by: Lucien Greathouse <me@lpghatguy.com> * Change log level to info * Refactor startSession to contain the logic * Formatting Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
Widget space is a precious resource on my 14 inch laptop, and the Rojo widget was wasting space for me most of the time. I simply pressed connect or disconnect and that was all. A simple keybinding would suffice for that common use case, but one didn't exist so I forked and added it.
I used a PluginAction so that users may go to
File > Advanced > Customize Shortcuts
in the Studio menu to set the keybinding. (We cannot set a default keybinding because Roblox still has not added that functionality, please support this feature request.)This PR adds a StudioPluginAction component, exposes the endSession function, and uses those to create plugin actions that start/end the session. Because it is done from within App, the keybinding will appropriately update the widget state.
There are three actions. One is a toggle- it will connect or disconnect, depending upon the current session state. The other two are connect and disconnect respectively. This allows the user to choose which to bind and decide if they prefer a single keybind for both actions or unique keybinds for each.
keybindDemo.mp4
A few things before this PR is ready to merge: