You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
[Scene] Add SceneStringNames::pressed
This commit is contained in:
@@ -212,7 +212,7 @@ void Polygon2DEditor::_update_bone_list() {
|
||||
cb->set_pressed(true);
|
||||
}
|
||||
|
||||
cb->connect("pressed", callable_mp(this, &Polygon2DEditor::_bone_paint_selected).bind(i));
|
||||
cb->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_bone_paint_selected).bind(i));
|
||||
}
|
||||
|
||||
uv_edit_draw->queue_redraw();
|
||||
@@ -1302,7 +1302,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
button_uv->set_theme_type_variation("FlatButton");
|
||||
add_child(button_uv);
|
||||
button_uv->set_tooltip_text(TTR("Open Polygon 2D UV editor."));
|
||||
button_uv->connect("pressed", callable_mp(this, &Polygon2DEditor::_menu_option).bind(MODE_EDIT_UV));
|
||||
button_uv->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_menu_option).bind(MODE_EDIT_UV));
|
||||
|
||||
uv_mode = UV_MODE_EDIT_POINT;
|
||||
uv_edit = memnew(AcceptDialog);
|
||||
@@ -1341,10 +1341,10 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
uv_edit_mode[2]->set_button_group(uv_edit_group);
|
||||
uv_edit_mode[3]->set_button_group(uv_edit_group);
|
||||
|
||||
uv_edit_mode[0]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(0));
|
||||
uv_edit_mode[1]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(1));
|
||||
uv_edit_mode[2]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(2));
|
||||
uv_edit_mode[3]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(3));
|
||||
uv_edit_mode[0]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(0));
|
||||
uv_edit_mode[1]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(1));
|
||||
uv_edit_mode[2]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(2));
|
||||
uv_edit_mode[3]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(3));
|
||||
|
||||
uv_mode_hb->add_child(memnew(VSeparator));
|
||||
|
||||
@@ -1354,7 +1354,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
uv_button[i]->set_theme_type_variation("FlatButton");
|
||||
uv_button[i]->set_toggle_mode(true);
|
||||
uv_mode_hb->add_child(uv_button[i]);
|
||||
uv_button[i]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_mode).bind(i));
|
||||
uv_button[i]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_mode).bind(i));
|
||||
uv_button[i]->set_focus_mode(FOCUS_NONE);
|
||||
}
|
||||
|
||||
@@ -1521,7 +1521,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
sync_bones = memnew(Button(TTR("Sync Bones to Polygon")));
|
||||
bone_scroll_main_vb->add_child(sync_bones);
|
||||
sync_bones->set_h_size_flags(0);
|
||||
sync_bones->connect("pressed", callable_mp(this, &Polygon2DEditor::_sync_bones));
|
||||
sync_bones->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_sync_bones));
|
||||
uv_main_hsc->add_child(bone_scroll_main_vb);
|
||||
bone_scroll = memnew(ScrollContainer);
|
||||
bone_scroll->set_v_scroll(true);
|
||||
|
||||
Reference in New Issue
Block a user