diff options
author | alexholly <alexander.holland@live.de> | 2017-06-04 00:25:13 +0200 |
---|---|---|
committer | alexholly <alexander.holland@live.de> | 2017-06-04 02:09:17 +0200 |
commit | a3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (patch) | |
tree | 37aaaa84b53d962b441de0683a502e189cb371bb /scene/main | |
parent | 69bec86028f87307e549d7a2f49bbb7e2b1f3771 (diff) |
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index a1d90c143e..ec36cf48bc 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1310,7 +1310,7 @@ Transform2D Viewport::_get_input_pre_xform() const { if (to_screen_rect != Rect2()) { - pre_xf.elements[2] = -to_screen_rect.pos; + pre_xf.elements[2] = -to_screen_rect.position; pre_xf.scale(size / to_screen_rect.size); } @@ -1473,17 +1473,17 @@ void Viewport::_gui_show_tooltip() { gui.tooltip_label->set_text(tooltip); Rect2 r(gui.tooltip_pos + Point2(10, 10), gui.tooltip_label->get_combined_minimum_size() + ttp->get_minimum_size()); Rect2 vr = gui.tooltip_label->get_viewport_rect(); - if (r.size.x + r.pos.x > vr.size.x) - r.pos.x = vr.size.x - r.size.x; - else if (r.pos.x < 0) - r.pos.x = 0; + if (r.size.x + r.position.x > vr.size.x) + r.position.x = vr.size.x - r.size.x; + else if (r.position.x < 0) + r.position.x = 0; - if (r.size.y + r.pos.y > vr.size.y) - r.pos.y = vr.size.y - r.size.y; - else if (r.pos.y < 0) - r.pos.y = 0; + if (r.size.y + r.position.y > vr.size.y) + r.position.y = vr.size.y - r.size.y; + else if (r.position.y < 0) + r.position.y = 0; - gui.tooltip_popup->set_global_position(r.pos); + gui.tooltip_popup->set_global_position(r.position); gui.tooltip_popup->set_size(r.size); gui.tooltip_popup->raise(); |