[Scene] Add SceneStringNames::text/value_changed

This commit is contained in:
A Thousand Ships
2024-05-14 11:42:00 +02:00
parent ca18a06ecb
commit fbb879debd
90 changed files with 238 additions and 232 deletions

View File

@@ -1636,7 +1636,7 @@ Size2 AnimationTimelineEdit::get_minimum_size() const {
void AnimationTimelineEdit::set_zoom(Range *p_zoom) {
zoom = p_zoom;
zoom->connect("value_changed", callable_mp(this, &AnimationTimelineEdit::_zoom_changed));
zoom->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTimelineEdit::_zoom_changed));
}
void AnimationTimelineEdit::auto_fit() {
@@ -1922,7 +1922,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0));
length->set_hide_slider(true);
length->set_tooltip_text(TTR("Animation length (seconds)"));
length->connect("value_changed", callable_mp(this, &AnimationTimelineEdit::_anim_length_changed));
length->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTimelineEdit::_anim_length_changed));
len_hb->add_child(length);
loop = memnew(Button);
loop->set_flat(true);
@@ -7200,7 +7200,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
timeline->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEditor::_name_limit_changed));
timeline->connect("track_added", callable_mp(this, &AnimationTrackEditor::_add_track));
timeline->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_timeline_value_changed));
timeline->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_timeline_value_changed));
timeline->connect("length_changed", callable_mp(this, &AnimationTrackEditor::_update_length));
panner.instantiate();
@@ -7229,7 +7229,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
hscroll = memnew(HScrollBar);
hscroll->share(timeline);
hscroll->hide();
hscroll->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_update_scroll));
hscroll->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_update_scroll));
timeline_vbox->add_child(hscroll);
timeline->set_hscroll(hscroll);
@@ -7307,7 +7307,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
step->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
step->set_tooltip_text(TTR("Animation step value."));
bottom_hb->add_child(step);
step->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_update_step));
step->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_update_step));
step->set_read_only(true);
snap_mode = memnew(OptionButton);
@@ -7393,7 +7393,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
pick_track->register_text_enter(pick_track->get_filter_line_edit());
pick_track->set_title(TTR("Pick a node to animate:"));
pick_track->connect("selected", callable_mp(this, &AnimationTrackEditor::_new_track_node_selected));
pick_track->get_filter_line_edit()->connect("text_changed", callable_mp(this, &AnimationTrackEditor::_pick_track_filter_text_changed));
pick_track->get_filter_line_edit()->connect(SceneStringName(text_changed), callable_mp(this, &AnimationTrackEditor::_pick_track_filter_text_changed));
pick_track->get_filter_line_edit()->connect(SceneStringName(gui_input), callable_mp(this, &AnimationTrackEditor::_pick_track_filter_input));
prop_selector = memnew(PropertySelector);