summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties_array_dict.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-07-19 15:20:25 +0200
committerGitHub <noreply@github.com>2021-07-19 15:20:25 +0200
commit855c7c7414a2f29cd420e8dd654a4630226bcd50 (patch)
tree343caeb7b32ef068f50a69e91dad2a8aefe681fb /editor/editor_properties_array_dict.cpp
parent54b598ffe4f1ba5cc55c947a2cb5192829770088 (diff)
parent6631f66c2a9d54dc80d57df60376c84ce1252d08 (diff)
downloadredot-engine-855c7c7414a2f29cd420e8dd654a4630226bcd50.tar.gz
Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
Diffstat (limited to 'editor/editor_properties_array_dict.cpp')
-rw-r--r--editor/editor_properties_array_dict.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 8b67b67571..596f515067 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -203,7 +203,7 @@ void EditorPropertyArray::_change_type_menu(int p_index) {
}
void EditorPropertyArray::_object_id_selected(const StringName &p_property, ObjectID p_id) {
- emit_signal("object_id_selected", p_property, p_id);
+ emit_signal(SNAME("object_id_selected"), p_property, p_id);
}
void EditorPropertyArray::update_property() {
@@ -346,7 +346,7 @@ void EditorPropertyArray::update_property() {
vbox->add_child(hbox);
Button *reorder_button = memnew(Button);
- reorder_button->set_icon(get_theme_icon("TripleBar", "EditorIcons"));
+ reorder_button->set_icon(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
reorder_button->set_default_cursor_shape(Control::CURSOR_MOVE);
reorder_button->connect("gui_input", callable_mp(this, &EditorPropertyArray::_reorder_button_gui_input));
reorder_button->connect("button_down", callable_mp(this, &EditorPropertyArray::_reorder_button_down), varray(i + offset));
@@ -383,12 +383,12 @@ void EditorPropertyArray::update_property() {
if (is_untyped_array) {
Button *edit = memnew(Button);
- edit->set_icon(get_theme_icon("Edit", "EditorIcons"));
+ edit->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
hbox->add_child(edit);
edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type), varray(edit, i + offset));
} else {
Button *remove = memnew(Button);
- remove->set_icon(get_theme_icon("Remove", "EditorIcons"));
+ remove->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
remove->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed), varray(i + offset));
hbox->add_child(remove);
}
@@ -421,7 +421,7 @@ void EditorPropertyArray::_remove_pressed(int p_index) {
void EditorPropertyArray::_button_draw() {
if (dropping) {
- Color color = get_theme_color("accent_color", "Editor");
+ Color color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
edit->draw_rect(Rect2(Point2(), edit->get_size()), color, false);
}
}
@@ -1070,7 +1070,7 @@ void EditorPropertyDictionary::update_property() {
for (int j = 0; j < 4; j++) {
flat->set_default_margin(Side(j), 2 * EDSCALE);
}
- flat->set_bg_color(get_theme_color("prop_subsection", "Editor"));
+ flat->set_bg_color(get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
pc->add_theme_style_override("panel", flat);
add_vbox = memnew(VBoxContainer);
@@ -1105,7 +1105,7 @@ void EditorPropertyDictionary::update_property() {
hbox->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
Button *edit = memnew(Button);
- edit->set_icon(get_theme_icon("Edit", "EditorIcons"));
+ edit->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
hbox->add_child(edit);
edit->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_change_type), varray(edit, change_index));
@@ -1131,7 +1131,7 @@ void EditorPropertyDictionary::update_property() {
}
void EditorPropertyDictionary::_object_id_selected(const StringName &p_property, ObjectID p_id) {
- emit_signal("object_id_selected", p_property, p_id);
+ emit_signal(SNAME("object_id_selected"), p_property, p_id);
}
void EditorPropertyDictionary::_notification(int p_what) {