summaryrefslogtreecommitdiffstats
path: root/editor/plugins/asset_library_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/asset_library_editor_plugin.cpp')
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 7db5a4eddf..99c7ab63e9 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -165,10 +165,10 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
if (p_clickable) {
author->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
icon->set_default_cursor_shape(CURSOR_POINTING_HAND);
- icon->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
- title->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
- category->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_category_clicked));
- author->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_author_clicked));
+ icon->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
+ title->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
+ category->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_category_clicked));
+ author->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItem::_author_clicked));
} else {
title->set_mouse_filter(MOUSE_FILTER_IGNORE);
category->set_mouse_filter(MOUSE_FILTER_IGNORE);
@@ -240,7 +240,7 @@ void EditorAssetLibraryItemDescription::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- previews_bg->add_theme_style_override("panel", previews->get_theme_stylebox(SNAME("normal"), SNAME("TextEdit")));
+ previews_bg->add_theme_style_override("panel", previews->get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit")));
} break;
}
}
@@ -303,7 +303,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
new_preview.button = memnew(Button);
new_preview.button->set_icon(previews->get_editor_theme_icon(SNAME("ThumbnailWait")));
new_preview.button->set_toggle_mode(true);
- new_preview.button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
+ new_preview.button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
preview_hb->add_child(new_preview.button);
if (!p_video) {
new_preview.image = previews->get_editor_theme_icon(SNAME("ThumbnailWait"));
@@ -330,7 +330,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
desc_vbox->add_child(description);
description->set_v_size_flags(Control::SIZE_EXPAND_FILL);
description->connect("meta_clicked", callable_mp(this, &EditorAssetLibraryItemDescription::_link_click));
- description->add_theme_constant_override("line_separation", Math::round(5 * EDSCALE));
+ description->add_theme_constant_override(SceneStringName(line_separation), Math::round(5 * EDSCALE));
previews_vbox = memnew(VBoxContainer);
previews_vbox->hide(); // Will be shown if we add any previews later.
@@ -577,7 +577,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
dismiss_button = memnew(TextureButton);
- dismiss_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
+ dismiss_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::_close));
title_hb->add_child(dismiss_button);
title->set_clip_text(true);
@@ -597,11 +597,11 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
install_button = memnew(Button);
install_button->set_text(TTR("Install..."));
install_button->set_disabled(true);
- install_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::install));
+ install_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::install));
retry_button = memnew(Button);
retry_button->set_text(TTR("Retry"));
- retry_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
+ retry_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
// Only show the Retry button in case of a failure.
retry_button->hide();
@@ -1134,7 +1134,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
first->set_text(TTR("First", "Pagination"));
first->set_theme_type_variation("PanelBackgroundButton");
if (p_page != 0) {
- first->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(0));
+ first->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(0));
} else {
first->set_disabled(true);
first->set_focus_mode(Control::FOCUS_NONE);
@@ -1145,7 +1145,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
prev->set_text(TTR("Previous", "Pagination"));
prev->set_theme_type_variation("PanelBackgroundButton");
if (p_page > 0) {
- prev->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page - 1));
+ prev->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(p_page - 1));
} else {
prev->set_disabled(true);
prev->set_focus_mode(Control::FOCUS_NONE);
@@ -1162,7 +1162,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
current->set_disabled(true);
current->set_focus_mode(Control::FOCUS_NONE);
} else {
- current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(i));
+ current->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(i));
}
hbc->add_child(current);
}
@@ -1171,7 +1171,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
next->set_text(TTR("Next", "Pagination"));
next->set_theme_type_variation("PanelBackgroundButton");
if (p_page < p_page_count - 1) {
- next->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page + 1));
+ next->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(p_page + 1));
} else {
next->set_disabled(true);
next->set_focus_mode(Control::FOCUS_NONE);
@@ -1183,7 +1183,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
last->set_text(TTR("Last", "Pagination"));
last->set_theme_type_variation("PanelBackgroundButton");
if (p_page != p_page_count - 1) {
- last->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page_count - 1));
+ last->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_search).bind(p_page_count - 1));
} else {
last->set_disabled(true);
last->set_focus_mode(Control::FOCUS_NONE);
@@ -1542,7 +1542,7 @@ void EditorAssetLibrary::_set_library_message(const String &p_message) {
library_message->set_text(p_message);
if (library_message_action.is_valid()) {
- library_message_button->disconnect("pressed", library_message_action);
+ library_message_button->disconnect(SceneStringName(pressed), library_message_action);
library_message_action = Callable();
}
library_message_button->hide();
@@ -1555,11 +1555,11 @@ void EditorAssetLibrary::_set_library_message_with_action(const String &p_messag
library_message_button->set_text(p_action_text);
if (library_message_action.is_valid()) {
- library_message_button->disconnect("pressed", library_message_action);
+ library_message_button->disconnect(SceneStringName(pressed), library_message_action);
library_message_action = Callable();
}
library_message_action = p_action;
- library_message_button->connect("pressed", library_message_action);
+ library_message_button->connect(SceneStringName(pressed), library_message_action);
library_message_button->show();
library_message_box->show();
@@ -1618,12 +1618,12 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
Button *open_asset = memnew(Button);
open_asset->set_text(TTR("Import..."));
search_hb->add_child(open_asset);
- open_asset->connect("pressed", callable_mp(this, &EditorAssetLibrary::_asset_open));
+ open_asset->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_asset_open));
Button *plugins = memnew(Button);
plugins->set_text(TTR("Plugins..."));
search_hb->add_child(plugins);
- plugins->connect("pressed", callable_mp(this, &EditorAssetLibrary::_manage_plugins));
+ plugins->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibrary::_manage_plugins));
if (p_templates_only) {
open_asset->hide();