Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use scroll container 's properties #57

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

HaroldLever
Copy link
Contributor

@HaroldLever HaroldLever commented Apr 19, 2024

UseScrollContainerProperties_zipped.mp4

ScrollContainer on left, SmoothScrollContainer on right.

scroll_horizontal and scroll_vertical now should work

scroll_deadzone now should work

Replaces SmoothScrollContainer.follow_focus_ by ScrollContainer.follow_focus

  • Since SmoothScrollContainer.follow_focus_ is removed, this is not a compatible change.
  • The default value of SmoothScrollContainer.follow_focus_ is true, while ScrollContainer.follow_focus is false. Should beware.
  • BTW, why don't use ScrollContainer.follow_focus at that time.

Overrides ScrollContainer.ensure_control_visible, now it should work.

InputEventMouseButton.factor is taken into calculation.

scroll_horizontal and scroll_vertical now should work.
scroll_deadzone now should work.
Replaces SmoothScrollContainer.follow_focus_ by ScrollContainer.follow_focus.
Overrides ScrollContainer.ensure_control_visible.
@SpyrexDE
Copy link
Owner

Those are good changes. I didn't know that you could override _get() to achieve this but it seems to work fine. Thanks :)

@SpyrexDE SpyrexDE merged commit 084359a into SpyrexDE:godot-4 Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants