Skip to content

Commit 136c4c6

Browse files
committed
Fix Embedded Game over expanded bottom panel - Simple version
1 parent 93d2706 commit 136c4c6

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

editor/gui/editor_bottom_panel.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ void EditorBottomPanel::toggle_last_opened_bottom_panel() {
293293
}
294294
}
295295

296+
void EditorBottomPanel::set_expanded(bool p_expanded) {
297+
expand_button->set_pressed(p_expanded);
298+
}
299+
296300
EditorBottomPanel::EditorBottomPanel() {
297301
item_vbox = memnew(VBoxContainer);
298302
add_child(item_vbox);

editor/gui/editor_bottom_panel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class EditorBottomPanel : public PanelContainer {
8686
void move_item_to_end(Control *p_item);
8787
void hide_bottom_panel();
8888
void toggle_last_opened_bottom_panel();
89+
void set_expanded(bool p_expanded);
8990

9091
EditorBottomPanel();
9192
};

editor/plugins/game_view_plugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "editor/editor_node.h"
4343
#include "editor/editor_settings.h"
4444
#include "editor/editor_string_names.h"
45+
#include "editor/gui/editor_bottom_panel.h"
4546
#include "editor/gui/editor_run_bar.h"
4647
#include "editor/plugins/embedded_process.h"
4748
#include "editor/themes/editor_scale.h"
@@ -300,6 +301,8 @@ void GameView::_play_pressed() {
300301
_update_embed_window_size();
301302
if (!window_wrapper->get_window_enabled()) {
302303
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_GAME);
304+
// Reset the normal size of the bottom panel when fully expanded.
305+
EditorNode::get_singleton()->get_bottom_panel()->set_expanded(false);
303306
embedded_process->grab_focus();
304307
}
305308
embedded_process->embed_process(current_process_id);

0 commit comments

Comments
 (0)