-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add editor setting to keep bottom panel state on play and stop game #91033
Add editor setting to keep bottom panel state on play and stop game #91033
Conversation
1e7e4b7
to
e78ac72
Compare
Following the suggestions of @passivestar and @Calinou, I made the following modifications: I removed the new settting and the old settings I also created a migrate_settings method in EditorSettings to convert old settings into the new ones. With these modifications, we should be able to close the proposal godotengine/godot-proposals#8507 and godotengine/godot-proposals#9513 |
editor/editor_settings.cpp
Outdated
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/output/action_on_play", 0, "Open Output,Open Debugger,Do Nothing") | ||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/output/action_on_stop", 1, "Close Bottom Panel,Do Nothing") |
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.
Since this is no longer specific to the Output panel, we should maybe rename the category.
Maybe run/bottom_panel/
?
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.
Was about to suggest this. The 2 old output-related ones can be put into an "Output" subsection (because you woudn't know what "Font Size" refers to otherwise)
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.
I think this is a good approach 👍 Given the popularity of godotengine/godot-proposals#8507 though, I wonder if we should consider making the default for "Action on Play" also to do nothing? We could trial it in 4.3 beta, and see if the feedback we get is mostly that people miss having the Output dock automatically displayed, or actually like this new behavior. One potential concern would be for new users to outright miss the fact that there's an Output panel where messages from their running game are displayed. There might be other ways to raise awareness about it, like adding a |
"Open Debugger" currently opens the output panel for me |
Also I just randomly found another PR that can be closed when this one is merged: #66503 |
And so this PR should also: And while at it, see also: |
@akien-mga Was it ever discussed to add an option to overlay output in the game itself like unreal does? I feel like godot might benefit from that a lot since it runs the game in a separate window and it can be inconvenient to see the output in a single-monitor setup |
Effectively, I used the wrong value in |
I changed the defaut value for "Action on Play" to "Do nothing". I'll wait for more feedback to see if we change it back to "Open Output". |
e78ac72
to
047eefb
Compare
Opening debugger works now I have this in Output though: If you make the debugger keep the currently opened tab instead of switching to stack trace this PR will also close godotengine/godot-proposals#7848. But I don't know how easy it is to do, so it's your call |
|
047eefb
to
46d0b29
Compare
If I manually remove it from my |
Tested, works as expected @akien-mga This PR now also closes both of godotengine/godot-proposals#7848 and godotengine/godot-proposals#3480 Probably also closes #60898 because it's now possible to keep the Animation tab opened when working on animations |
46d0b29
to
b8466f0
Compare
I placed "Do nothing" first in both settings, that way, the default option is the first and it will be easier to add new options in the future without having "Do nothing" in the middle. Also, I found a problem with the "Close bottom panel" on stop, it was closing the bottom panel only if current panel was Output. It now always closes the bottom panel whatever panel you are on. This changes the behavior of the previous option "Always close on stop". I think it's ok and makes more sense?? |
This makes sense to me, I could imagine somebody for example messing with the debugger when the game is running and wanting it to close when the game stops If we dive deep we'd probably find an even better design for all of this but tbh I think it's good enough at this point. This PR solves a bunch of actual reported problems, including mine |
It won't. See godotengine/godot-proposals#4444 |
b8466f0
to
e4b2dde
Compare
This last commit adds 2 enums and move the code from editor_debugger_node to editor_node which effectively is much cleaner. |
907e1e0
to
ee2fac0
Compare
ee2fac0
to
813fc9f
Compare
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.
Tested locally, it works as expected.
I think this new default makes sense, but I'm worried about users potentially not noticing where their print()
output goes (particularly for beginners). I wonder if we should make it so the Output panel is opened if you currently don't have any panel open.
Perhaps this could also be alleviated by adding an "unread messages count" to the Output panel button's text, like Debugger already gets when warnings/errors are printed. I'd prefer this solution personally, but it should probably be implemented in a separate PR.
I understand your concern and like your idea of unread count like the debugger. I think when you start Godot for the first time the default layout has the Output panel open. In fact, I remember as a new user searching how to close this panel at the bottom. My point is if the Ouput panel is there by default, the user should see the output by default because the default setting is Do nothing. |
I'm thinking about what @Calinou said and I don't see a lot of possibilities. The easy solution is to change the default value for I'm not sure about the suggestion "I wonder if we should make it so the Output panel is opened if you currently don't have any panel open." because I personally don't use the builtin print. I have a custom print that prints output directly in the game (similar to Unreal) and Godot prints thinks that I don't need. |
It could be one of the available options, but IMO it's too specific. |
Given the above discussion, I think we can still merge this now to include in 4.3 (despite feature freeze - this is a relatively safe change and with a lot of demand), but given the timeline I would opt for using defaults that match the pre-existing behavior for now. We won't have much time during the short beta period for collecting user feedback about potential new defaults, so I think it's safer to provide the extra features while keeping the same defaults for 4.3. And we can try out changing the defaults for 4.4 early on the dev cycle, so we have several months to gather and address user feedback. |
813fc9f
to
76205d4
Compare
Wonderful! I changed the default value for |
Thanks! |
This PR adds the editor settings run/output/keep_current_bottom_panel_on_play. The setting is false by default keep the old behavior.
It should close the proposal: godotengine/godot-proposals#9513
The objective is to override the settings run/output/always_close_output_on_stop and run/output/keep_current_bottom_panel_on_play so the bottom panel stay the way it was when starting and stopping the game.
Production edit: