-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Camera-driven UI #10559
Merged
+872
−296
Merged
Camera-driven UI #10559
Changes from 31 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
9abf5b4
Update split_screen example; replace `window_roots` with `camera_roots`
bardt 5d86151
Ui is painted to both left and right viewports
bardt 310cb62
Independent panels rendering
bardt bcd8ee7
Propagate UiCamera to children
bardt 19edd49
Default to any active primary window camera
bardt b4546f1
Layout based on camera scale factor
bardt 3bd738e
Update camera target scale factor on window change
bardt c94cb9b
Propagate UI camera on children change
bardt 5f1db01
Relative cursor position
bardt 79a2ed9
Resize viewport on scale factor change
bardt b80b6c1
Restore initial ui_layout_system order
bardt 1dfc40f
Merge branch 'main' into camera-driven-ui
bardt 2a2d254
Post-merge formatting
bardt 4ea0fb6
Interactive UI in split screen example
bardt 7bc0a5e
Revers button example, update cursor position example
bardt 3f6b606
Can layout without a camera
bardt d2889f1
Default to primary window itself, not a camera
bardt 436e1d8
Improve code formatting
bardt 94e0c3b
Code formatting in examples
bardt f5c2aff
Remove redundant explicit ordering
bardt febd33c
Example of rendering UI to a texture
bardt 9631616
Merge branch 'main' into camera-driven-ui
bardt 7676e63
Pre-calculate camera layout into
bardt 441542c
Make layout system execution order closer to original
bardt 0b45e1e
Optimize UiCamera popagation
bardt 54e8e6c
Fix `relative_cursor_position` example
bardt 468da45
Update examples/ui/render_ui_to_texture.rs
bardt 402109b
Default to a single camera if only one exists
bardt 1d36e12
Reduce number of iterations over nodes
bardt 3116a58
Clippy fix
bardt aa3a714
Fix imports in example
bardt 9b06ca2
Rename UiCamera to TargetCamera
bardt 9e91865
Merge branch 'main' into camera-driven-ui
bardt ccc6b51
Fix compilation issues after merging main
bardt 5b9826d
Merge branch 'main' into camera-driven-ui
bardt 085fce0
Predefined query for default UI camera
cc64788
Merge remote-tracking branch 'upstream/main' into camera-driven-ui
0502405
HashMap for camera cursor positions
5856694
Fix disappeared text and borders
067429d
Remove UiCameraConfig component
6f30f35
Merge branch 'main' into camera-driven-ui
alice-i-cecile afe71da
Repair merge conflicts
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this should probably be a hashmap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separately here, it would be nice to provide a way for users to provide cursor coords for non-window UIs so that we can have all the interaction functionality for world-space UIs as well. it could definitely be a follow up, but perhaps something as simple as an
Option<ManualCursorPosition>
on the camera entity would be easy and sufficient?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I am running out of motivation on this pull request. I was also thinking about a way to provide coordinates manually, but this requires a little more thinking and testing that I have in me currently. I would love to focus on the changes which are necessary for this to be a mergable valuable piece of work, and leave all the rest of improvements for later (and probably for someone else to work on).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm willing to do a follow-up PR after this is merged.