-
-
Notifications
You must be signed in to change notification settings - Fork 744
Support targeting multiple entities with UiEvents generated by the MouseUiSystem #2138
Conversation
…upport targeting multiple entities with UiEvents generated by the MouseUiSystem
Codecov Report
@@ Coverage Diff @@
## master #2138 +/- ##
==========================================
- Coverage 83.9% 83.41% -0.49%
==========================================
Files 74 74
Lines 5994 5994
==========================================
- Hits 5029 5000 -29
- Misses 965 994 +29
Continue to review full report at Codecov.
|
amethyst_ui/src/event.rs
Outdated
}); | ||
|
||
let mut first_opaque = None; | ||
for (i, (_e, t)) in entity_transforms.iter().enumerate() { |
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.
Perhaps this is clearer:
let first_opaque = entity_transforms.iter().position(|(_e, t)| t.opaque);
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.
Definitely better, thanks!
Oops. I think I made a git noob mistake. Not sure why I have duplicate commits. I rebased to amend the first commit. Then I pulled and had to merge. I probably should have just made a new commit. |
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.
Thanks!
bors r+ |
2138: Support targeting multiple entities with UiEvents generated by the MouseUiSystem r=azriel91 a=bonsairobo ## Description Support targeting multiple entities with UiEvents generated by the MouseUiSystem ## Additions - Add the `transparent_target: bool` field to `UiTransform` and `UiTransformData`. ## Modifications - Use the field in `ui::events::targeted` to support the desired behavior. ## PR Checklist By placing an x in the boxes I certify that I have: - [ ] Updated the content of the book if this PR would make the book outdated. - [x] Added a changelog entry if this will impact users, or modified more than 5 lines of Rust that wasn't a doc comment. - [ ] Added unit tests for new code added in this PR. - [x] Acknowledged that by making this pull request I release this code under an MIT/Apache 2.0 dual licensing scheme. If this modified or created any rs files: - [x] Ran `cargo +stable fmt --all` - [x] Ran `cargo clippy --all --features "empty"` - [x] Ran `cargo test --all --features "empty"` Co-authored-by: Duncan <bonsairobo@gmail.com>
Build failed |
bors retry |
2138: Support targeting multiple entities with UiEvents generated by the MouseUiSystem r=azriel91 a=bonsairobo ## Description Support targeting multiple entities with UiEvents generated by the MouseUiSystem ## Additions - Add the `transparent_target: bool` field to `UiTransform` and `UiTransformData`. ## Modifications - Use the field in `ui::events::targeted` to support the desired behavior. ## PR Checklist By placing an x in the boxes I certify that I have: - [ ] Updated the content of the book if this PR would make the book outdated. - [x] Added a changelog entry if this will impact users, or modified more than 5 lines of Rust that wasn't a doc comment. - [ ] Added unit tests for new code added in this PR. - [x] Acknowledged that by making this pull request I release this code under an MIT/Apache 2.0 dual licensing scheme. If this modified or created any rs files: - [x] Ran `cargo +stable fmt --all` - [x] Ran `cargo clippy --all --features "empty"` - [x] Ran `cargo test --all --features "empty"` Co-authored-by: Duncan <bonsairobo@gmail.com>
Build succeeded |
Description
Support targeting multiple entities with UiEvents generated by the MouseUiSystem
Additions
transparent_target: bool
field toUiTransform
andUiTransformData
.Modifications
ui::events::targeted
to support the desired behavior.PR Checklist
By placing an x in the boxes I certify that I have:
If this modified or created any rs files:
cargo +stable fmt --all
cargo clippy --all --features "empty"
cargo test --all --features "empty"