-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
implemented grow(left,top,right,bottom) function #8981
Conversation
Mind if you bind it to GDScript? Also, not sure if we should have a |
grow margin also would be nice!
|
I think overloaded functions look better. For the second one, it would likely be better to use the same convention as in CSS (top, right, bottom left), unless there's already a precedent in Godot's API for starting with left. |
order was inspired by margin: enum Margin {
MARGIN_LEFT,
MARGIN_TOP,
MARGIN_RIGHT,
MARGIN_BOTTOM
}; okay sounds good. (overloading) |
Ok, you can keep the same order as in the enum then, it makes sense. |
I'm not sure if we can bind the overloaded methods properly though... |
I'm currently trying... could not compile yet...
|
okay same name is just overwriting the binding -> ony one grow function possible... |
@akien-mga @bojidar-bg the requested updates are done. |
@akien-mga merge ? |
Would be good if you can squash as the second commit modifies the first commit's implementation. You can take the opportunity to fix the typo in the commit log :p |
good call |
- grow_individual - grow_margin
rebased |
this function is useful when resizing a rect with different values for each corner.
I need it for the new rounded corner style box implementation.
since it is not directly related with the style box, it might be nicer to have a separated pr...