summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorAndrettin <andre.ng@live.com>2019-03-02 12:11:42 +0100
committerAndrettin <andre.ng@live.com>2019-03-02 12:11:42 +0100
commit30c07c1ae16e13113cde92da8ecacdfe6fcde1d9 (patch)
treee11bb123a1c558d2348b31f2c018068de2c9cd7e /scene/main
parenta42549b8f703754a43bad2557357cb7046874118 (diff)
Made the tooltip position offset configurable
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 090e6bdcb0..0fa36cc308 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1486,7 +1486,8 @@ void Viewport::_gui_show_tooltip() {
gui.tooltip_popup->set_as_toplevel(true);
//gui.tooltip_popup->hide();
- Rect2 r(gui.tooltip_pos + Point2(10, 10), gui.tooltip_popup->get_minimum_size());
+ Point2 tooltip_offset = ProjectSettings::get_singleton()->get("display/mouse_cursor/tooltip_position_offset");
+ Rect2 r(gui.tooltip_pos + tooltip_offset, gui.tooltip_popup->get_minimum_size());
Rect2 vr = gui.tooltip_popup->get_viewport_rect();
if (r.size.x + r.position.x > vr.size.x)
r.position.x = vr.size.x - r.size.x;