1
0
Fork 0

Merge pull request #102978 from Hilderin/fix-embedded-game-over-expanded-bottom-panel-simple-version

Fix Embedded Game over expanded bottom panel, by resetting expanded bottom panel on Play
This commit is contained in:
Thaddeus Crews 2025-02-18 20:47:52 -06:00
commit 93b6a17689
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
3 changed files with 8 additions and 0 deletions

View File

@ -293,6 +293,10 @@ void EditorBottomPanel::toggle_last_opened_bottom_panel() {
} }
} }
void EditorBottomPanel::set_expanded(bool p_expanded) {
expand_button->set_pressed(p_expanded);
}
EditorBottomPanel::EditorBottomPanel() { EditorBottomPanel::EditorBottomPanel() {
item_vbox = memnew(VBoxContainer); item_vbox = memnew(VBoxContainer);
add_child(item_vbox); add_child(item_vbox);

View File

@ -86,6 +86,7 @@ public:
void move_item_to_end(Control *p_item); void move_item_to_end(Control *p_item);
void hide_bottom_panel(); void hide_bottom_panel();
void toggle_last_opened_bottom_panel(); void toggle_last_opened_bottom_panel();
void set_expanded(bool p_expanded);
EditorBottomPanel(); EditorBottomPanel();
}; };

View File

@ -42,6 +42,7 @@
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/editor_string_names.h" #include "editor/editor_string_names.h"
#include "editor/gui/editor_bottom_panel.h"
#include "editor/gui/editor_run_bar.h" #include "editor/gui/editor_run_bar.h"
#include "editor/plugins/embedded_process.h" #include "editor/plugins/embedded_process.h"
#include "editor/themes/editor_scale.h" #include "editor/themes/editor_scale.h"
@ -300,6 +301,8 @@ void GameView::_play_pressed() {
_update_embed_window_size(); _update_embed_window_size();
if (!window_wrapper->get_window_enabled()) { if (!window_wrapper->get_window_enabled()) {
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_GAME); EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_GAME);
// Reset the normal size of the bottom panel when fully expanded.
EditorNode::get_singleton()->get_bottom_panel()->set_expanded(false);
embedded_process->grab_focus(); embedded_process->grab_focus();
} }
embedded_process->embed_process(current_process_id); embedded_process->embed_process(current_process_id);