diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-08-05 22:52:58 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-08-05 22:52:58 +0200 |
commit | e82270e8d05dec7d7c679455f30c3ea5d634120c (patch) | |
tree | a66d305ca4656fd5c78b8f7c34a933dad1f90225 /scene/2d/node_2d.cpp | |
parent | 3b2dfae5af9759da31516de25fcae12001092bb0 (diff) | |
download | redot-engine-e82270e8d05dec7d7c679455f30c3ea5d634120c.tar.gz |
Renames properties and methods to avoid ambiguities
- Method Node2D.scale(Vector2) renamed to Node2D.apply_scale(Vector2)
- Property BaseButton.is_pressed renamed to BaseButton.pressed
Diffstat (limited to 'scene/2d/node_2d.cpp')
-rw-r--r-- | scene/2d/node_2d.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 9de46fd937..3a3c5a2005 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -243,7 +243,7 @@ void Node2D::global_translate(const Vector2 &p_amount) { set_global_position(get_global_position() + p_amount); } -void Node2D::scale(const Size2 &p_amount) { +void Node2D::apply_scale(const Size2 &p_amount) { set_scale(get_scale() * p_amount); } @@ -419,7 +419,7 @@ void Node2D::_bind_methods() { ClassDB::bind_method(D_METHOD("move_local_y", "delta", "scaled"), &Node2D::move_y, DEFVAL(false)); ClassDB::bind_method(D_METHOD("translate", "offset"), &Node2D::translate); ClassDB::bind_method(D_METHOD("global_translate", "offset"), &Node2D::global_translate); - ClassDB::bind_method(D_METHOD("scale", "ratio"), &Node2D::scale); + ClassDB::bind_method(D_METHOD("apply_scale", "ratio"), &Node2D::apply_scale); ClassDB::bind_method(D_METHOD("set_global_position", "pos"), &Node2D::set_global_position); ClassDB::bind_method(D_METHOD("get_global_position"), &Node2D::get_global_position); |