mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Rename Math::stepify to snapped
This commit is contained in:
parent
be509bf5e4
commit
b743a2ef3c
28 changed files with 148 additions and 148 deletions
|
@ -129,8 +129,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
add_point_pos += blend_space->get_min_space();
|
||||
|
||||
if (snap->is_pressed()) {
|
||||
add_point_pos.x = Math::stepify(add_point_pos.x, blend_space->get_snap().x);
|
||||
add_point_pos.y = Math::stepify(add_point_pos.y, blend_space->get_snap().y);
|
||||
add_point_pos.x = Math::snapped(add_point_pos.x, blend_space->get_snap().x);
|
||||
add_point_pos.y = Math::snapped(add_point_pos.y, blend_space->get_snap().y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,8 +215,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
Vector2 point = blend_space->get_blend_point_position(selected_point);
|
||||
point += drag_ofs;
|
||||
if (snap->is_pressed()) {
|
||||
point.x = Math::stepify(point.x, blend_space->get_snap().x);
|
||||
point.y = Math::stepify(point.y, blend_space->get_snap().y);
|
||||
point.x = Math::snapped(point.x, blend_space->get_snap().x);
|
||||
point.y = Math::snapped(point.y, blend_space->get_snap().y);
|
||||
}
|
||||
|
||||
updating = true;
|
||||
|
@ -467,8 +467,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
|
|||
if (dragging_selected && selected_point == point_idx) {
|
||||
point += drag_ofs;
|
||||
if (snap->is_pressed()) {
|
||||
point.x = Math::stepify(point.x, blend_space->get_snap().x);
|
||||
point.y = Math::stepify(point.y, blend_space->get_snap().y);
|
||||
point.x = Math::snapped(point.x, blend_space->get_snap().x);
|
||||
point.y = Math::snapped(point.y, blend_space->get_snap().y);
|
||||
}
|
||||
}
|
||||
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
|
||||
|
@ -503,8 +503,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
|
|||
if (dragging_selected && selected_point == i) {
|
||||
point += drag_ofs;
|
||||
if (snap->is_pressed()) {
|
||||
point.x = Math::stepify(point.x, blend_space->get_snap().x);
|
||||
point.y = Math::stepify(point.y, blend_space->get_snap().y);
|
||||
point.x = Math::snapped(point.x, blend_space->get_snap().x);
|
||||
point.y = Math::snapped(point.y, blend_space->get_snap().y);
|
||||
}
|
||||
}
|
||||
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
|
||||
|
@ -702,8 +702,8 @@ void AnimationNodeBlendSpace2DEditor::_update_edited_point_pos() {
|
|||
if (dragging_selected) {
|
||||
pos += drag_ofs;
|
||||
if (snap->is_pressed()) {
|
||||
pos.x = Math::stepify(pos.x, blend_space->get_snap().x);
|
||||
pos.y = Math::stepify(pos.y, blend_space->get_snap().y);
|
||||
pos.x = Math::snapped(pos.x, blend_space->get_snap().x);
|
||||
pos.y = Math::snapped(pos.y, blend_space->get_snap().y);
|
||||
}
|
||||
}
|
||||
updating = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue