diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-06-05 15:52:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-05 15:52:05 +0200 |
commit | f8d7670e82007103573b88f48fe7b7c4addbd66d (patch) | |
tree | f4802061ca26ae9220ec9a5e9d51d80e1a465faa /modules | |
parent | 075c7d8133e4fde353ab54a255638b0c9a3740a5 (diff) | |
parent | a3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (diff) |
Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/godot/godot_rect2.cpp | 16 | ||||
-rw-r--r-- | modules/gdnative/godot/godot_rect2.h | 6 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/modules/gdnative/godot/godot_rect2.cpp b/modules/gdnative/godot/godot_rect2.cpp index eea95ca6fe..0e456ea3ba 100644 --- a/modules/gdnative/godot/godot_rect2.cpp +++ b/modules/gdnative/godot/godot_rect2.cpp @@ -38,11 +38,11 @@ extern "C" { void _rect2_api_anchor() {} -void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) { - const Vector2 *pos = (const Vector2 *)p_pos; +void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) { + const Vector2 *position = (const Vector2 *)p_pos; const Vector2 *size = (const Vector2 *)p_size; Rect2 *dest = (Rect2 *)r_dest; - *dest = Rect2(*pos, *size); + *dest = Rect2(*position, *size); } void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) { @@ -124,11 +124,11 @@ godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const god return *self == *b; } -godot_vector2 GDAPI godot_rect2_get_pos(const godot_rect2 *p_self) { +godot_vector2 GDAPI godot_rect2_get_position(const godot_rect2 *p_self) { godot_vector2 dest; Vector2 *d = (Vector2 *)&dest; const Rect2 *self = (const Rect2 *)p_self; - *d = self->get_pos(); + *d = self->get_position(); return dest; } @@ -140,10 +140,10 @@ godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self) { return dest; } -void GDAPI godot_rect2_set_pos(godot_rect2 *p_self, const godot_vector2 *p_pos) { +void GDAPI godot_rect2_set_position(godot_rect2 *p_self, const godot_vector2 *p_pos) { Rect2 *self = (Rect2 *)p_self; - const Vector2 *pos = (const Vector2 *)p_pos; - self->set_pos(*pos); + const Vector2 *position = (const Vector2 *)p_pos; + self->set_position(*position); } void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size) { diff --git a/modules/gdnative/godot/godot_rect2.h b/modules/gdnative/godot/godot_rect2.h index 9743321a3b..488a1204f7 100644 --- a/modules/gdnative/godot/godot_rect2.h +++ b/modules/gdnative/godot/godot_rect2.h @@ -46,7 +46,7 @@ typedef struct godot_rect2 { #include "../godot.h" #include "godot_vector2.h" -void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size); +void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size); void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height); godot_string GDAPI godot_rect2_as_string(const godot_rect2 *p_self); @@ -71,11 +71,11 @@ godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vect godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b); -godot_vector2 GDAPI godot_rect2_get_pos(const godot_rect2 *p_self); +godot_vector2 GDAPI godot_rect2_get_position(const godot_rect2 *p_self); godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self); -void GDAPI godot_rect2_set_pos(godot_rect2 *p_self, const godot_vector2 *p_pos); +void GDAPI godot_rect2_set_position(godot_rect2 *p_self, const godot_vector2 *p_pos); void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 54c957078a..941668d474 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1011,7 +1011,7 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt } Rect2 pos = members->get_item_rect(ti); - new_function_menu->set_position(members->get_global_position() + pos.pos + Vector2(0, pos.size.y)); + new_function_menu->set_position(members->get_global_position() + pos.position + Vector2(0, pos.size.y)); new_function_menu->popup(); return; } else if (p_button == 0) { |