mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Allow scroll_to_line when scroll_active is 'false'
Fix #36134
(cherry picked from commit 8f11a91917)
This commit is contained in:
committed by
Rémi Verschelde
parent
26c617654e
commit
d15e9c2126
@@ -545,6 +545,9 @@ void ScrollBar::_drag_node_exit() {
|
||||
}
|
||||
|
||||
void ScrollBar::_drag_node_input(const Ref<InputEvent> &p_input) {
|
||||
if (!drag_node_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_input;
|
||||
|
||||
@@ -638,6 +641,10 @@ NodePath ScrollBar::get_drag_node() const {
|
||||
return drag_node_path;
|
||||
}
|
||||
|
||||
void ScrollBar::set_drag_node_enabled(bool p_enable) {
|
||||
drag_node_enabled = p_enable;
|
||||
}
|
||||
|
||||
void ScrollBar::set_smooth_scroll_enabled(bool p_enable) {
|
||||
smooth_scroll_enabled = p_enable;
|
||||
}
|
||||
@@ -668,6 +675,7 @@ ScrollBar::ScrollBar(Orientation p_orientation) {
|
||||
|
||||
drag.active = false;
|
||||
|
||||
drag_node_enabled = true;
|
||||
drag_node_speed = Vector2();
|
||||
drag_node_touching = false;
|
||||
drag_node_touching_deaccel = false;
|
||||
|
||||
Reference in New Issue
Block a user