-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
UiRect
axes constructor
#7656
UiRect
axes constructor
#7656
Conversation
…onpe/bevy into uirect_vertical_horizontal
UiRect
that sets the vertical and horizontal fields to uniform values
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.
LGTM but I'm similarly unhappy with that name.
uniform_axes
is better, but not great. xy
is very terse but not super clear. paired_axes
or matching_axes
isn't any better.
What about UiRect::symmetric(horizontal, vertical)
?
I'm not sure about |
Part of the problem is like |
#shipit 🚀 🚀 😎 Can we split out the different uses of
|
I also recently thought that the the name does not describe what the |
I really hate the name Maybe |
I like |
I thought about the name Another option is to have separate types At the moment the |
I like As for the type question, I like |
Definitely |
UiRect
that sets the vertical and horizontal fields to uniform valuesUiRect
axes constructor
This is ready to be merged I think. |
Objective
We don't have a constructor function for
UiRect
that sets uniform horizontal and vertical values, even though it is a common pattern.Solution
Add a constructor function to
UiRect
calledaxes
, that sets bothleft
andright
to the same given horizontal value,and sets both
top
andbottom
to same given vertical value.Changelog
axes
toUiRect
.