-
-
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
UI Node Border Radius and Shadows #8973
Closed
Closed
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
e772dfe
`bevy_ui` changes
ickshonpe 7a49efb
Added invert corners mode to `ui.wgsl`
ickshonpe b86bd5a
Corruption resolved, the rect field for the inner border rect should …
ickshonpe 728b866
Check for border radius should have greater than not greater or equal…
ickshonpe b8f784e
Implemented inner radius for partial borders
ickshonpe 3b6fa71
Cleaned up `ui.wgsl` a bit
ickshonpe 8cf677a
cleaned up fragnment shader
ickshonpe f8f035d
`ui.wgsl`
ickshonpe 8c7b7e4
`extract_uinode_borders`
ickshonpe 0a2e8b5
cargo fmt --all
ickshonpe 9c2fbc6
Merge branch 'main' into rounded-nodes
ickshonpe 87e1429
Clean up.
ickshonpe 661eb8a
Adds support for non-uniform corner rounding.
ickshonpe 8dc2f88
Most bugs seem to be fixed, remaining case is with two adjacent roun…
ickshonpe c0cf89e
Clean up, cargo fmt
ickshonpe 26d8451
Removed unused import.
ickshonpe 0350886
`UiCornerRadius`:
ickshonpe c900671
cargo fmt
ickshonpe b9cc579
`bevy_ui::node_bundles`
ickshonpe 49618a4
`many_buttons`
ickshonpe e855a8b
Use the `as_rainbow` function for border colors too.
ickshonpe a7cbf3a
cargo fmt --all
ickshonpe 588c0ae
Use percentages for border values
ickshonpe eaf714d
Merge branch 'many-buttons-bordered' into rounded-nodes
ickshonpe 667d69e
Removed `FromReflect` derive from `UiBorderRadius`.
ickshonpe 67630fe
Fixed textures.
ickshonpe d9e98eb
fixes for ci lints
ickshonpe ae2b5c3
Merge branch 'many-buttons-bordered' into rounded-nodes
ickshonpe c95b5b4
Added more doc comments.
ickshonpe e7d86a8
Update crates/bevy_ui/src/ui_node.rs
ickshonpe c575717
add missing `UiBorderRadius` import to doc comment example
ickshonpe 2513156
added border and round corners to game menu example
ickshonpe b49bdcd
Added missing default to `Style` declaration in the `border_radius` d…
ickshonpe 8330dc7
better AA
ickshonpe 1543c9b
`UiNodeShadow`
ickshonpe 8a7d9e0
Added an index buffer to UI renderer.
ickshonpe 9cb44bb
Almost there, but 0 size borders rendered
ickshonpe 9db2de6
Fixed corner and border values to map correctly from bevy types to sh…
ickshonpe c95317b
chopped
ickshonpe adb8ace
Added `with_left`, `with_right`, `with_top`, `with_bottom` `UiRect` …
ickshonpe d099ae4
Merge branch 'rounded-nodes' into rounded-nodes-index-buffer-two-colors
ickshonpe 86f851a
`bevy_ui::geometry::UiRect`
ickshonpe fbdd5a9
Merge branch 'ui-rect-builder-funcs' into rounded-nodes-index-buffer-…
ickshonpe b6b0ca2
All unrounded cases seem to be working now.
ickshonpe 2560785
Update examples/stress_tests/many_buttons.rs
ickshonpe 29139ef
rounded rects displaying correctly
ickshonpe 91e0795
Clean up ui shader dead code
ickshonpe f342980
`bevy_ui::render`
ickshonpe bdda002
cargo fmt
ickshonpe 49ce0c4
formatting
ickshonpe 77f625c
`ui.wgsl`
ickshonpe ceda428
`bevy_ui::render`
ickshonpe afe327e
`ui.wgsl`
ickshonpe 1d6b976
Merge branch 'rounded-nodes-box-shadow' into border-radius-box-shadow
ickshonpe 7d908b1
fix merge
ickshonpe 0663393
`UiNodeShadow`
ickshonpe 87ee2c7
Clean up + cargo fmt
ickshonpe 7963803
`bevy_ui::render` module
ickshonpe 8d0af9d
cargo fmt
ickshonpe b2cd4ae
Merge branch 'rounded-nodes' of https://github.com/ickshonpe/bevy int…
ickshonpe 0ceaba9
Merge branch 'border-radius-box-shadow' into rounded-nodes
ickshonpe a32ef6b
comments
ickshonpe 19da4b1
Reordered UiBorderRadius methods.
ickshonpe dfebacf
fix whitespace
ickshonpe 4294fd9
formatting
ickshonpe 3d2c438
Adjusted shadow defaults.
ickshonpe d84c61e
`UiShadow`
ickshonpe 65c92be
`ui.wgsl` changes:
ickshonpe 737ea7f
`bevy_ui::render`
ickshonpe 6018ab6
Added an alternative sdf function that sets the inner radius to zero …
ickshonpe 2adc733
Swapped the default inner radius behaviour back to how it was. Slight…
ickshonpe e4eca30
`ui.wgsl`: `sd_rounded_box` refactor
ickshonpe b2896bd
`bevy_ui::render`
ickshonpe 5e9fab2
`ExtractedUiNode`
ickshonpe 63b1967
`ui.wgsl`
ickshonpe c04e484
`prepare_uinodes`
ickshonpe 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -465,6 +465,7 @@ mod tests { | |||||
], | ||||||
grid_column: GridPlacement::start(4), | ||||||
grid_row: GridPlacement::span(3), | ||||||
border_radius: Default::default(), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}; | ||||||
let viewport_values = LayoutContext::new(1.0, bevy_math::Vec2::new(800., 600.)); | ||||||
let taffy_style = from_style(&viewport_values, &bevy_style); | ||||||
|
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.
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.
You should probably use
Self
instead ofUiRect
here. (Repeat with similar methods)