mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Refactor 'treshold' to 'threshold'
This commit is contained in:
parent
0067982f5e
commit
2fd204c35e
44 changed files with 182 additions and 184 deletions
|
|
@ -140,7 +140,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||
cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
|
||||
|
||||
//first check if a point is to be added (segment split)
|
||||
real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
|
||||
real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
|
||||
|
||||
switch (mode) {
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||
return true;
|
||||
} else {
|
||||
|
||||
if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
|
||||
if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
|
||||
//wip closed
|
||||
_wip_close();
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||
continue; //not valid to reuse point
|
||||
|
||||
real_t d = cp.distance_to(gpoint);
|
||||
if (d < closest_dist && d < grab_treshold) {
|
||||
if (d < closest_dist && d < grab_threshold) {
|
||||
closest_dist = d;
|
||||
closest_outline = j;
|
||||
closest_pos = cp;
|
||||
|
|
@ -252,7 +252,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||
Vector2 cp = xform.xform(poly[i]);
|
||||
|
||||
real_t d = cp.distance_to(gpoint);
|
||||
if (d < closest_dist && d < grab_treshold) {
|
||||
if (d < closest_dist && d < grab_threshold) {
|
||||
closest_dist = d;
|
||||
closest_pos = cp;
|
||||
closest_outline = j;
|
||||
|
|
@ -312,7 +312,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||
Vector2 cp = xform.xform(poly[i]);
|
||||
|
||||
real_t d = cp.distance_to(gpoint);
|
||||
if (d < closest_dist && d < grab_treshold) {
|
||||
if (d < closest_dist && d < grab_threshold) {
|
||||
closest_dist = d;
|
||||
closest_pos = cp;
|
||||
closest_outline = j;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue