v0.5.0: fixed many vfx alignment issues
This commit is contained in:
@@ -147,6 +147,14 @@ public class Visual extends Gizmo {
|
||||
y = p.y - height / 2;
|
||||
return p;
|
||||
}
|
||||
|
||||
//returns the point needed to center the argument visual on this visual
|
||||
public PointF center( Visual v ) {
|
||||
return new PointF(
|
||||
x + (width() - v.width())/2f,
|
||||
y + (height() - v.height())/2f
|
||||
);
|
||||
}
|
||||
|
||||
public float width() {
|
||||
return width * scale.x;
|
||||
|
||||
Reference in New Issue
Block a user