-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Adding tile direction aka "anchor" aka "alignment" support to GridObjectCollection #4777
Comments
I'd recommend we make a net new |
@radicalad, I think we can actually do this without needing to rewrite or GridObjectCollection, or create a new class. While I like the idea of starting from a clean slate, re-using GridObjectCollection has a few advantages:
|
@radicalad I've got the "anchor" field working in GridObjectCollection without needing to rewrite it, the code change was actually fairly minimal. I don't think we need to rewrite GridObjectCollection. |
The current GridObjectCollection will tile the objects with the parent object in the center of the collection - this great if you have a collection that you want to appear in the middle of something, but if you have a UI where you have a grid of buttons, which you want to appear going from the top left of a place and then growing toward the bottom right, this makes things difficult (i.e. you need to duplicate the layout logic to figure out where the buttons will be, and then move the parent object to JUST the right location).
This is trivially "workaroundable" by just setting the xOffset and yOffset starting values to zero, but it would probably be helpful to have an option on the object collections to provide a "which direction will they grow from"
Add a single field "anchor" with the following values: "Upper Left", "Upper Center",...,"Middle Left",..."Bottom Left",...,"Bottom Right". This matches what Unity has for Text Meshes:

Update "Rows" to be "Rows or Columns", since if the layout is "Columns then rows", then the layout actually uses the "Rows" field to determine the maximum number of columns to use, not rows :-)
The text was updated successfully, but these errors were encountered: