summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-14 11:42:00 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-06-19 09:44:38 +0200
commitfbb879debd0957354ab42731be402b0a5a9f4e48 (patch)
tree1904b70039d8221e6732828420ef083814ac26ad /editor/editor_properties.cpp
parentca18a06ecbf68db50d8d7e7391b73a245c745cea (diff)
downloadredot-engine-fbb879debd0957354ab42731be402b0a5a9f4e48.tar.gz
[Scene] Add `SceneStringNames::text/value_changed`
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index fa1584822d..fdb4ec170b 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -140,7 +140,7 @@ EditorPropertyText::EditorPropertyText() {
hb->add_child(text);
add_focusable(text);
text->set_h_size_flags(SIZE_EXPAND_FILL);
- text->connect("text_changed", callable_mp(this, &EditorPropertyText::_text_changed));
+ text->connect(SceneStringName(text_changed), callable_mp(this, &EditorPropertyText::_text_changed));
text->connect("text_submitted", callable_mp(this, &EditorPropertyText::_text_submitted));
}
@@ -168,7 +168,7 @@ void EditorPropertyMultilineText::_open_big_text() {
big_text->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("expression"), EditorStringName(EditorFonts)));
big_text->add_theme_font_size_override(SceneStringName(font_size), get_theme_font_size(SNAME("expression_size"), EditorStringName(EditorFonts)));
}
- big_text->connect("text_changed", callable_mp(this, &EditorPropertyMultilineText::_big_text_changed));
+ big_text->connect(SceneStringName(text_changed), callable_mp(this, &EditorPropertyMultilineText::_big_text_changed));
big_text->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY);
big_text_dialog = memnew(AcceptDialog);
big_text_dialog->add_child(big_text);
@@ -228,7 +228,7 @@ EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) {
add_child(hb);
set_bottom_editor(hb);
text = memnew(TextEdit);
- text->connect("text_changed", callable_mp(this, &EditorPropertyMultilineText::_text_changed));
+ text->connect(SceneStringName(text_changed), callable_mp(this, &EditorPropertyMultilineText::_text_changed));
text->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY);
add_focusable(text);
hb->add_child(text);
@@ -1348,7 +1348,7 @@ EditorPropertyInteger::EditorPropertyInteger() {
spin->set_flat(true);
add_child(spin);
add_focusable(spin);
- spin->connect("value_changed", callable_mp(this, &EditorPropertyInteger::_value_changed));
+ spin->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyInteger::_value_changed));
}
///////////////////// OBJECT ID /////////////////////////
@@ -1485,7 +1485,7 @@ EditorPropertyFloat::EditorPropertyFloat() {
spin->set_flat(true);
add_child(spin);
add_focusable(spin);
- spin->connect("value_changed", callable_mp(this, &EditorPropertyFloat::_value_changed));
+ spin->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyFloat::_value_changed));
}
///////////////////// EASING /////////////////////////
@@ -1697,7 +1697,7 @@ EditorPropertyEasing::EditorPropertyEasing() {
spin->set_hide_slider(true);
spin->set_allow_lesser(true);
spin->set_allow_greater(true);
- spin->connect("value_changed", callable_mp(this, &EditorPropertyEasing::_spin_value_changed));
+ spin->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyEasing::_spin_value_changed));
spin->get_line_edit()->connect(SceneStringName(focus_exited), callable_mp(this, &EditorPropertyEasing::_spin_focus_exited));
spin->hide();
add_child(spin);
@@ -1789,7 +1789,7 @@ EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
}
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyRect2::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1885,7 +1885,7 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
}
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2i::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyRect2i::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1972,7 +1972,7 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyPlane::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyPlane::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2145,7 +2145,7 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
spin[i]->set_label(desc[i]);
default_layout->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyQuaternion::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2172,7 +2172,7 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
euler[i]->set_label(desc[i]);
edit_custom_layout->add_child(euler[i]);
add_focusable(euler[i]);
- euler[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_custom_value_changed));
+ euler[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyQuaternion::_custom_value_changed));
if (horizontal) {
euler[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2261,7 +2261,7 @@ EditorPropertyAABB::EditorPropertyAABB() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyAABB::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyAABB::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -2345,7 +2345,7 @@ EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) {
}
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyTransform2D::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -2428,7 +2428,7 @@ EditorPropertyBasis::EditorPropertyBasis() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyBasis::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyBasis::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -2520,7 +2520,7 @@ EditorPropertyTransform3D::EditorPropertyTransform3D() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform3D::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyTransform3D::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -2620,7 +2620,7 @@ EditorPropertyProjection::EditorPropertyProjection() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyProjection::_value_changed).bind(desc[i]));
+ spin[i]->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyProjection::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}