1
0
Fork 0

Add additional options to Action on Play and Stop

This commit is contained in:
Jayden Sipe 2025-02-22 14:55:17 -05:00
parent 96cdbbe5bd
commit a0f9e8f30c
3 changed files with 8 additions and 2 deletions

View File

@ -4684,6 +4684,8 @@ void EditorNode::_project_run_started() {
bottom_panel->make_item_visible(log);
} else if (action_on_play == ACTION_ON_PLAY_OPEN_DEBUGGER) {
bottom_panel->make_item_visible(EditorDebuggerNode::get_singleton());
} else if (action_on_play == ACTION_ON_PLAY_CLOSE_BUTTOM_PANEL) {
bottom_panel->hide_bottom_panel();
}
}
@ -4691,6 +4693,8 @@ void EditorNode::_project_run_stopped() {
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();
} else if (action_on_stop == ACTION_ON_STOP_OPEN_OUTPUT) {
bottom_panel->make_item_visible(log);
}
}

View File

@ -127,10 +127,12 @@ public:
ACTION_ON_PLAY_DO_NOTHING,
ACTION_ON_PLAY_OPEN_OUTPUT,
ACTION_ON_PLAY_OPEN_DEBUGGER,
ACTION_ON_PLAY_CLOSE_BUTTOM_PANEL,
};
enum ActionOnStop {
ACTION_ON_STOP_DO_NOTHING,
ACTION_ON_STOP_OPEN_OUTPUT,
ACTION_ON_STOP_CLOSE_BUTTOM_PANEL,
};

View File

@ -958,8 +958,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("run/auto_save/save_before_running", true, true);
// Bottom panel
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "run/bottom_panel/action_on_play", EditorNode::ACTION_ON_PLAY_OPEN_OUTPUT, "Do Nothing,Open Output,Open Debugger")
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "run/bottom_panel/action_on_stop", EditorNode::ACTION_ON_STOP_DO_NOTHING, "Do Nothing,Close Bottom Panel")
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "run/bottom_panel/action_on_play", EditorNode::ACTION_ON_PLAY_OPEN_OUTPUT, "Do Nothing,Open Output,Open Debugger,Close Bottom Panel")
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "run/bottom_panel/action_on_stop", EditorNode::ACTION_ON_STOP_DO_NOTHING, "Do Nothing,Open Output,Close Bottom Panel")
// Output
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_RANGE, "run/output/font_size", 13, "8,48,1")