skipping/stopping while scrolling a scrollbar
Asked Answered
G

1

0

the line2d should not be offset after the scroll bar scrolls, yet it is. any ideas on how to fix this?
without scrolling

after scrolling

here is my code:

func _on_h_scroll_bar_scrolling():
	if scroll_was < $UI/HScrollBar.value:
		lineX -= 10
		$Line2D.position = Vector2(lineX, 0)
	elif scroll_was > $UI/HScrollBar.value:
		lineX += 10
		$Line2D.position = Vector2(lineX, 0)
	else:
		pass
	scroll_was = $UI/HScrollBar.value
Goethe answered 30/8, 2023 at 15:20 Comment(0)
R
0

I'm having trouble understanding what went wrong from your description. How is the line offset? How should it appear?

Reina answered 31/8, 2023 at 1:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.