-
-
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
enhance UiRect
with convenience methods
#4323
Comments
|
Adding to what @mockersf said: I think the
|
For my understanding: What is the difference between those two Rects? How are they supposed to be used? |
|
Isn't it a bit weird to express a position or a margin as a rectangle? At least for me this sounds really confusing. |
The name isn't very good... Don't hesitate if you have a better idea in #4276 |
Since #5686 was merged and the
There are other methods like |
Naming suggestion: "Insets". |
Should there be a way to convert between the two? Then it would allow for building a Rect in |
I'm another new user who's stumbled across this issue while looking to make a first contribution to Bevy and is not sure what, if anything, needs to actually be done here. I think this issue is either fixed by #5686 or is too vague to be actionable. I'm not sure what the etiquette is for pinging maintainers, so I'll just ask @alice-i-cecile directly: do you agree that this issue should be closed, or is there something specific required to resolve it? |
Other name suggestions:
|
I think this should be closed. I'm not opposed to more utility methods, but I don't think this is a useful place to start. |
What problem does this solve or what need does it fill?
Rect
,UiRect
respectively after #4276 is merged, is a plain data structure representing rectangles used for UI. There are certain computations associated to rectangles, that users might frequently need.What solution would you like?
Offer convenience methods such as
center(&self) -> Point
translate(self, Vec2) -> Self
,Additional context
Egui already has a similar struct.
The text was updated successfully, but these errors were encountered: