feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -67,6 +67,11 @@ void EditorSceneTabs::_notification(int p_what) {
|
|||
_scene_tabs_resized();
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
_scene_tabs_resized();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -116,15 +121,10 @@ void EditorSceneTabs::_scene_tab_exit() {
|
|||
}
|
||||
|
||||
void EditorSceneTabs::_scene_tab_input(const Ref<InputEvent> &p_input) {
|
||||
int tab_id = scene_tabs->get_hovered_tab();
|
||||
Ref<InputEventMouseButton> mb = p_input;
|
||||
|
||||
if (mb.is_valid()) {
|
||||
if (tab_id >= 0) {
|
||||
if (mb->get_button_index() == MouseButton::MIDDLE && mb->is_pressed()) {
|
||||
_scene_tab_closed(tab_id);
|
||||
}
|
||||
} else if (mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) {
|
||||
if (mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) {
|
||||
int tab_buttons = 0;
|
||||
if (scene_tabs->get_offset_buttons_visible()) {
|
||||
tab_buttons = get_theme_icon(SNAME("increment"), SNAME("TabBar"))->get_width() + get_theme_icon(SNAME("decrement"), SNAME("TabBar"))->get_width();
|
||||
|
|
@ -203,7 +203,7 @@ void EditorSceneTabs::_update_context_menu() {
|
|||
scene_tabs_context_menu->set_item_text(-1, TTR("Close Tab"));
|
||||
scene_tabs_context_menu->add_shortcut(ED_GET_SHORTCUT("editor/reopen_closed_scene"), EditorNode::FILE_OPEN_PREV);
|
||||
scene_tabs_context_menu->set_item_text(-1, TTR("Undo Close Tab"));
|
||||
DISABLE_LAST_OPTION_IF(!EditorNode::get_singleton()->has_previous_scenes());
|
||||
DISABLE_LAST_OPTION_IF(!EditorNode::get_singleton()->has_previous_closed_scenes());
|
||||
scene_tabs_context_menu->add_item(TTR("Close Other Tabs"), SCENE_CLOSE_OTHERS);
|
||||
DISABLE_LAST_OPTION_IF(EditorNode::get_editor_data().get_edited_scene_count() <= 1);
|
||||
scene_tabs_context_menu->add_item(TTR("Close Tabs to the Right"), SCENE_CLOSE_RIGHT);
|
||||
|
|
@ -437,6 +437,7 @@ EditorSceneTabs::EditorSceneTabs() {
|
|||
scene_tab_add = memnew(Button);
|
||||
scene_tab_add->set_flat(true);
|
||||
scene_tab_add->set_tooltip_text(TTR("Add a new scene."));
|
||||
scene_tab_add->set_accessibility_name(TTRC("Add Scene"));
|
||||
scene_tabs->add_child(scene_tab_add);
|
||||
scene_tab_add->connect(SceneStringName(pressed), callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(EditorNode::FILE_NEW_SCENE, false));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue