Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
add setCenterPosition and other methods to Actor #2000
Do you mind if I change these to
import static com.badlogic.gdx.scenes.scene2d.utils.Align.*; ... actor.getX(right); actor.getY(top | right); actor.getY(topRight); actor.setPosition(100, 100, center); actor.setPosition(100, 100, bottom | right); actor.setPosition(100, 100, bottomRight); actor.setOrigin(top | left); actor.setOrigin(topLeft);
I started doing this for origin and thought it could be done for the others.
Updated previous comment.
We could also remove getRight() and getTop() in favor of getX(right) and getY(top). What do you think?
Hmm, one potential issue (that also setCenterPosition has) is dividing width or height by 2 may result in non-integer positions. I guess the user just can't use these methods if they don't want that.