diff options
Diffstat (limited to 'scene/gui/scroll_container.cpp')
-rw-r--r-- | scene/gui/scroll_container.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 52feb2ab23..411891ece8 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -244,11 +244,11 @@ void ScrollContainer::_ensure_focused_visible(Control *p_control) { if (is_a_parent_of(p_control)) { Rect2 global_rect = get_global_rect(); Rect2 other_rect = p_control->get_global_rect(); - float right_margin = 0; + float right_margin = 0.0; if (v_scroll->is_visible()) { right_margin += v_scroll->get_size().x; } - float bottom_margin = 0; + float bottom_margin = 0.0; if (h_scroll->is_visible()) { bottom_margin += h_scroll->get_size().y; } @@ -624,15 +624,7 @@ ScrollContainer::ScrollContainer() { add_child(v_scroll); v_scroll->connect("value_changed", callable_mp(this, &ScrollContainer::_scroll_moved)); - drag_speed = Vector2(); - drag_touching = false; - drag_touching_deaccel = false; - beyond_deadzone = false; - scroll_h = true; - scroll_v = true; - deadzone = GLOBAL_GET("gui/common/default_scroll_deadzone"); - follow_focus = false; set_clip_contents(true); }; |