diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-13 20:12:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 20:12:22 +0100 |
commit | 775e74e0d41daa9cf3679c2e215f4ef46eee9cbc (patch) | |
tree | 483bbfe4dff66f69c8eaf56add41bc720c8f6710 /scene | |
parent | cad371dd85f0b7a7f7717759a36aa477092a269c (diff) | |
parent | 30c07c1ae16e13113cde92da8ecacdfe6fcde1d9 (diff) |
Merge pull request #26484 from Andrettin/Configurable-Tooltip-Offset
Make the Tooltip Position Offset Configurable
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index b32b50923a..a5d86c3e1a 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1476,7 +1476,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; |