diff options
| author | Rémi Verschelde | 2017-06-05 15:52:05 +0200 |
|---|---|---|
| committer | GitHub | 2017-06-05 15:52:05 +0200 |
| commit | f8d7670e82007103573b88f48fe7b7c4addbd66d (patch) | |
| tree | f4802061ca26ae9220ec9a5e9d51d80e1a465faa /scene/gui/container.cpp | |
| parent | 075c7d8133e4fde353ab54a255638b0c9a3740a5 (diff) | |
| parent | a3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (diff) | |
| download | godot-f8d7670.tar.gz godot-f8d7670.tar.zst godot-f8d7670.zip | |
Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'scene/gui/container.cpp')
| -rw-r--r-- | scene/gui/container.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index c428d524a..92bb5d43a 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -96,18 +96,18 @@ void Container::fit_child_in_rect(Control *p_child, const Rect2 &p_rect) { if (!(p_child->get_h_size_flags() & SIZE_FILL)) { r.size.x = minsize.x; - r.pos.x += Math::floor((p_rect.size.x - minsize.x) / 2); + r.position.x += Math::floor((p_rect.size.x - minsize.x) / 2); } if (!(p_child->get_v_size_flags() & SIZE_FILL)) { r.size.y = minsize.y; - r.pos.y += Math::floor((p_rect.size.y - minsize.y) / 2); + r.position.y += Math::floor((p_rect.size.y - minsize.y) / 2); } for (int i = 0; i < 4; i++) p_child->set_anchor(Margin(i), ANCHOR_BEGIN); - p_child->set_position(r.pos); + p_child->set_position(r.position); p_child->set_size(r.size); p_child->set_rotation(0); p_child->set_scale(Vector2(1, 1)); |
