@Override
public void draw(Batch batch, float parentAlpha) {
float x = getX();
float y = getY();
float width = getWidth() * getScaleX();
float height = getHeight() * getScaleY();
Texture pageTexture = page.getTexture();
if (pageTexture != null) {
if (firstPageRender) {
firstPageRender = false;
startPageAppearAnimation();
}
Color col = getColor();
batch.setColor(col.r, col.g, col.b, col.a * parentAlpha * pageAlpha);
batch.draw(pageTexture, x, y, width, height);
}
batch.setColor(Color.BLACK);
borderFrame.draw(batch, x, y, width, height);
super.draw(batch, parentAlpha);
}