1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

[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

@@ -1149,13 +1149,13 @@ TextureRegionEditor::TextureRegionEditor() {
sb_off_x = memnew(SpinBox);
sb_off_x->set_step(1);
sb_off_x->set_suffix("px");
sb_off_x->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_off_x));
sb_off_x->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_off_x));
hb_grid->add_child(sb_off_x);
sb_off_y = memnew(SpinBox);
sb_off_y->set_step(1);
sb_off_y->set_suffix("px");
sb_off_y->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_off_y));
sb_off_y->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_off_y));
hb_grid->add_child(sb_off_y);
hb_grid->add_child(memnew(VSeparator));
@@ -1165,14 +1165,14 @@ TextureRegionEditor::TextureRegionEditor() {
sb_step_x->set_min(0);
sb_step_x->set_step(1);
sb_step_x->set_suffix("px");
sb_step_x->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_step_x));
sb_step_x->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_step_x));
hb_grid->add_child(sb_step_x);
sb_step_y = memnew(SpinBox);
sb_step_y->set_min(0);
sb_step_y->set_step(1);
sb_step_y->set_suffix("px");
sb_step_y->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_step_y));
sb_step_y->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_step_y));
hb_grid->add_child(sb_step_y);
hb_grid->add_child(memnew(VSeparator));
@@ -1182,14 +1182,14 @@ TextureRegionEditor::TextureRegionEditor() {
sb_sep_x->set_min(0);
sb_sep_x->set_step(1);
sb_sep_x->set_suffix("px");
sb_sep_x->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_sep_x));
sb_sep_x->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_sep_x));
hb_grid->add_child(sb_sep_x);
sb_sep_y = memnew(SpinBox);
sb_sep_y->set_min(0);
sb_sep_y->set_step(1);
sb_sep_y->set_suffix("px");
sb_sep_y->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_sep_y));
sb_sep_y->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_sep_y));
hb_grid->add_child(sb_sep_y);
hb_grid->hide();
@@ -1246,13 +1246,13 @@ TextureRegionEditor::TextureRegionEditor() {
vscroll = memnew(VScrollBar);
vscroll->set_anchors_and_offsets_preset(Control::PRESET_RIGHT_WIDE);
vscroll->set_step(0.001);
vscroll->connect("value_changed", callable_mp(this, &TextureRegionEditor::_scroll_changed));
vscroll->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_scroll_changed));
texture_overlay->add_child(vscroll);
hscroll = memnew(HScrollBar);
hscroll->set_anchors_and_offsets_preset(Control::PRESET_BOTTOM_WIDE);
hscroll->set_step(0.001);
hscroll->connect("value_changed", callable_mp(this, &TextureRegionEditor::_scroll_changed));
hscroll->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_scroll_changed));
texture_overlay->add_child(hscroll);
}