title: Rotate TextButton with libgdx
body: <p>I have a textButton and I want to place it on the screen rotated by 90deg.</p>
  
  <p>For some reason all methods for rotation(rotate(), setRotationAngle() and so on) assosiated with TextButton object do not work properly.</p>
  
  <p>So I've implemented new class extending the TextButton and overriding draw() method:</p>
  
  <pre><code>@Override
  public void draw(SpriteBatch batch, float parentAlpha) {
       Matrix4 rotationMatrix = new Matrix4();
       Matrix4 oldMatrix = batch.getTransformMatrix();
       rotationMatrix.idt();
       rotationMatrix.rotate(new Vector3(this.getX(),this.getY()+this.getHeight(),0),rotationAngle);
       batch.setTransformMatrix(rotationMatrix);
       super.draw(batch, parentAlpha);
       batch.setTransformMatrix(oldMatrix);
  }
  </code></pre>
  
  <p>Where <code>rotationAngle</code> equals to 90.0. And for some reason button isn't rotated by 90degress, but for some unknown amount of degrees.</p>
  
  <p><img src="https://i.stack.imgur.com/KtAlX.png" alt="enter image description here"></p>
  
  <p><strong>UPD</strong></p>
  
  <p>After I switched back to TextButton object and did :</p>
  
  <pre><code>newGame.setTransform(true);
  newGame.rotate(90);
  </code></pre>
  
  <p>It almost worked meaning that text in the button was rotated corrently, but the background of the button stayed on it's spot:</p>
  
  <p><img src="https://i.stack.imgur.com/UaYo1.png" alt="enter image description here"></p>
  
  <p>So my question is: Why does this happen and how can I solve this ? </p>