mirror of
https://github.com/godotengine/godot.git
synced 2025-01-06 02:00:57 +00:00
parent
d22ceeef1b
commit
7da0ec01c0
@ -106,9 +106,9 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
|
||||
if (ofs < grabber_ofs) {
|
||||
|
||||
if (scrolling) {
|
||||
target_scroll = target_scroll - get_page();
|
||||
target_scroll = CLAMP(target_scroll - get_page(), get_min(), get_max() - get_page());
|
||||
} else {
|
||||
target_scroll = get_value() - get_page();
|
||||
target_scroll = CLAMP(get_value() - get_page(), get_min(), get_max() - get_page());
|
||||
}
|
||||
|
||||
if (smooth_scroll_enabled) {
|
||||
@ -130,9 +130,9 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
|
||||
update();
|
||||
} else {
|
||||
if (scrolling) {
|
||||
target_scroll = target_scroll + get_page();
|
||||
target_scroll = CLAMP(target_scroll + get_page(), get_min(), get_max() - get_page());
|
||||
} else {
|
||||
target_scroll = get_value() + get_page();
|
||||
target_scroll = CLAMP(get_value() + get_page(), get_min(), get_max() - get_page());
|
||||
}
|
||||
|
||||
if (smooth_scroll_enabled) {
|
||||
|
Loading…
Reference in New Issue
Block a user