aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/light_occluder_2d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-07-08 23:51:53 +0200
committerGitHub2017-07-08 23:51:53 +0200
commitd23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00 (patch)
tree7b83394ae29c9e2d195892aece1a26f451376e21 /editor/plugins/light_occluder_2d_editor_plugin.cpp
parente577c5b0705168177943fcdf9a0b66c1f8f864f3 (diff)
parent2fd204c35e6883d36d4c15adbe6725ffffd73c6f (diff)
downloadgodot-d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00.tar.gz
godot-d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00.tar.zst
godot-d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00.zip
Merge pull request #9564 from Noshyaar/pr-threshold
Refactor 'treshold' to 'threshold'
Diffstat (limited to 'editor/plugins/light_occluder_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index 09021446d..a7a20e71f 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -126,7 +126,7 @@ bool LightOccluder2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector<Vector2> poly = Variant(node->get_occluder_polygon()->get_polygon());
//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) {
@@ -145,12 +145,12 @@ bool LightOccluder2DEditor::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(true);
return true;
- } else if (wip.size() > 1 && xform.xform(wip[wip.size() - 1]).distance_to(gpoint) < grab_treshold) {
+ } else if (wip.size() > 1 && xform.xform(wip[wip.size() - 1]).distance_to(gpoint) < grab_threshold) {
//wip closed
_wip_close(false);
return true;
@@ -204,7 +204,7 @@ bool LightOccluder2DEditor::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_pos = cp;
closest_idx = i;
@@ -233,7 +233,7 @@ bool LightOccluder2DEditor::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_idx = i;
@@ -278,7 +278,7 @@ bool LightOccluder2DEditor::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_idx = i;