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

debug_ui: Improve debug rect bounds calculation & draw bounds on hover #16926

Merged
merged 2 commits into from
Jun 29, 2024

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Jun 29, 2024

Before this patch, it was possible that some objects did not have a debug rect despite existing on the stage and interacting with the user. That was the case for instance for buttons with hit bounds and no up state (see for instance #16921).

This patch ensures that debug rect is at least as big as highlight bounds, which are used to highlight focused objects on the stage.

Additionally, when the user hovers on world bounds and highlight bounds, debug rects signifying their positions are automatically drawn in order to visualize their positions on the stage.

@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Jun 29, 2024
Before this patch, it was possible that some objects did not have a
debug rect despite existing on the stage and interacting with the user.
That was the case for instance for buttons with hit bounds and no up state.

This patch ensures that debug rect is at least as big as highlight bounds,
which are used to highlight focused objects on the stage.
When the user hovers on world bounds and highlight bounds,
debug rects signifying their positions are automatically drawn.
@Dinnerbone Dinnerbone merged commit a9708a8 into ruffle-rs:master Jun 29, 2024
17 checks passed
@kjarosh kjarosh deleted the debug-ui-bounds branch June 29, 2024 19:58
@sleepycatcoding sleepycatcoding removed the waiting-on-review Waiting on review from a Ruffle team member label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants