-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
C-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Description
What problem does this solve or what need does it fill?
Reviewer asked a question about the PR #21903 which made me realise this type is confusing.
In UI and world coordinates, “top” and “bottom” mean opposite things, so these fields are ambiguous. Anyone using BorderRect must decide themselves how to apply the vertical insets.
What solution would you like?
Resolve the ambiguity by replacing the directional BorderRect fields (left, right, top, bottom) with two Vec2 fields:
pub struct BorderRect {
pub min: Vec2,
pub max: Vec2,
}Additional context
Metadata
Metadata
Assignees
Labels
C-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!