Fix vertex ui

This commit is contained in:
fgnm
2021-12-31 12:55:15 +01:00
parent 5b14d7e2bd
commit fddf4a77c4
2 changed files with 8 additions and 1 deletions
@@ -86,7 +86,13 @@ public class PolygonFollower extends SubFollower {
protected void setStage(Stage stage) {
super.setStage(stage);
if (stage != null)
shapeDrawer = new ShapeDrawer(stage.getBatch(), WhitePixel.sharedInstance.textureRegion);
shapeDrawer = new ShapeDrawer(stage.getBatch(), WhitePixel.sharedInstance.textureRegion){
/* OPTIONAL: Ensuring a certain smoothness. */
@Override
protected int estimateSidesRequired(float radiusX, float radiusY) {
return 200;
}
};
addActor(innerMesh);
addActor(outline);
addActor(vertices);
@@ -43,6 +43,7 @@ public class PolyVertex extends Actor implements Pool.Poolable {
setColor(selected ? selectedColor : normalColor);
getColor().a *= parentAlpha;
shapeDrawer.filledCircle(getX() + getWidth() * 0.5f, getY() + getHeight() * 0.5f, (getWidth() + 2) * 0.5f, Color.BLACK);
shapeDrawer.filledCircle(getX() + getWidth() * 0.5f, getY() + getHeight() * 0.5f, getWidth() * 0.5f, getColor());
if (selected)
indexLabel.draw(batch, parentAlpha);