1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Merge pull request #91033 from Hilderin/keep_current_bottom_panel_on_play

Add editor setting to keep bottom panel state on play and stop game
This commit is contained in:
Rémi Verschelde
2024-05-29 22:13:45 +02:00
6 changed files with 29 additions and 19 deletions

View File

@@ -4543,17 +4543,19 @@ void EditorNode::_project_run_started() {
log->clear();
}
if (bool(EDITOR_GET("run/output/always_open_output_on_play"))) {
int action_on_play = EDITOR_GET("run/bottom_panel/action_on_play");
if (action_on_play == ACTION_ON_PLAY_OPEN_OUTPUT) {
bottom_panel->make_item_visible(log);
} else if (action_on_play == ACTION_ON_PLAY_OPEN_DEBUGGER) {
bottom_panel->make_item_visible(EditorDebuggerNode::get_singleton());
}
}
void EditorNode::_project_run_stopped() {
if (!bool(EDITOR_GET("run/output/always_close_output_on_stop"))) {
return;
int action_on_stop = EDITOR_GET("run/bottom_panel/action_on_stop");
if (action_on_stop == ACTION_ON_STOP_CLOSE_BUTTOM_PANEL) {
bottom_panel->hide_bottom_panel();
}
bottom_panel->make_item_visible(log, false);
}
void EditorNode::notify_all_debug_sessions_exited() {