bevy
bevy copied to clipboard
scrollbar helper functions
Objective
Add helper functions to ComputedNode to compute the scrollbar areas of a UI node.
Solution
Add horizontal_scrollbar and vertical_scrollbar functions to ComputedNode. If a scrollbar is present, these return an option wrapping a tuple of the node-centered bounding Rect for the scrollbar, and the start and end points of the thumb.
Testing
Includes a couple of tests in the uinode module.