|
@@ -63,12 +63,12 @@ void EditorMainScreen::_notification(int p_what) {
|
|
|
for (int i = 0; i < buttons.size(); i++) {
|
|
|
Button *tb = buttons[i];
|
|
|
EditorPlugin *p_editor = editor_table[i];
|
|
|
- Ref<Texture2D> icon = p_editor->get_icon();
|
|
|
+ Ref<Texture2D> icon = p_editor->get_plugin_icon();
|
|
|
|
|
|
if (icon.is_valid()) {
|
|
|
tb->set_button_icon(icon);
|
|
|
- } else if (has_theme_icon(p_editor->get_name(), EditorStringName(EditorIcons))) {
|
|
|
- tb->set_button_icon(get_theme_icon(p_editor->get_name(), EditorStringName(EditorIcons)));
|
|
|
+ } else if (has_theme_icon(p_editor->get_plugin_name(), EditorStringName(EditorIcons))) {
|
|
|
+ tb->set_button_icon(get_theme_icon(p_editor->get_plugin_name(), EditorStringName(EditorIcons)));
|
|
|
}
|
|
|
}
|
|
|
} break;
|
|
@@ -198,7 +198,7 @@ void EditorMainScreen::select(int p_index) {
|
|
|
EditorData &editor_data = EditorNode::get_editor_data();
|
|
|
int plugin_count = editor_data.get_editor_plugin_count();
|
|
|
for (int i = 0; i < plugin_count; i++) {
|
|
|
- editor_data.get_editor_plugin(i)->notify_main_screen_changed(selected_plugin->get_name());
|
|
|
+ editor_data.get_editor_plugin(i)->notify_main_screen_changed(selected_plugin->get_plugin_name());
|
|
|
}
|
|
|
|
|
|
EditorNode::get_singleton()->update_distraction_free_mode();
|
|
@@ -236,12 +236,12 @@ void EditorMainScreen::add_main_plugin(EditorPlugin *p_editor) {
|
|
|
Button *tb = memnew(Button);
|
|
|
tb->set_toggle_mode(true);
|
|
|
tb->set_theme_type_variation("MainScreenButton");
|
|
|
- tb->set_name(p_editor->get_name());
|
|
|
- tb->set_text(p_editor->get_name());
|
|
|
+ tb->set_name(p_editor->get_plugin_name());
|
|
|
+ tb->set_text(p_editor->get_plugin_name());
|
|
|
|
|
|
- Ref<Texture2D> icon = p_editor->get_icon();
|
|
|
- if (icon.is_null() && has_theme_icon(p_editor->get_name(), EditorStringName(EditorIcons))) {
|
|
|
- icon = get_editor_theme_icon(p_editor->get_name());
|
|
|
+ Ref<Texture2D> icon = p_editor->get_plugin_icon();
|
|
|
+ if (icon.is_null() && has_theme_icon(p_editor->get_plugin_name(), EditorStringName(EditorIcons))) {
|
|
|
+ icon = get_editor_theme_icon(p_editor->get_plugin_name());
|
|
|
}
|
|
|
if (icon.is_valid()) {
|
|
|
tb->set_button_icon(icon);
|
|
@@ -260,7 +260,7 @@ void EditorMainScreen::remove_main_plugin(EditorPlugin *p_editor) {
|
|
|
// Remove the main editor button and update the bindings of
|
|
|
// all buttons behind it to point to the correct main window.
|
|
|
for (int i = buttons.size() - 1; i >= 0; i--) {
|
|
|
- if (p_editor->get_name() == buttons[i]->get_text()) {
|
|
|
+ if (p_editor->get_plugin_name() == buttons[i]->get_text()) {
|
|
|
if (buttons[i]->is_pressed()) {
|
|
|
select(EDITOR_SCRIPT);
|
|
|
}
|