Advertisement

Libgdx TextField is not rotating

Started by June 27, 2021 11:24 AM
2 comments, last by yusufabi 3 years, 6 months ago

Hi. I m using libgdx and i would like to rotate textfield, button is rotating with this code but textfield is not.

button = new TextButton("SEND", skin);

button.setPosition(200,100);

button.setSize(200, 40);

button.setTransform(true);

button.setRotation(90);

user = new TextField("", skin);

user.setPosition(100,100);

user.setSize(200, 40);

user.setRotation(90);

is there a way to rotate textfield? thanks for every suggestion

For detailed help for a software package like libgdx, you are likely better off using a forum dedicated to libgdx.

There are libgdx users here so you may be lucky, but in general people here are experts in designing and programming games in general rather than experts in how to rotate libgdx text fields.

Advertisement

Alberth I solved the problem.

If someone has a problem like textfield rotation you have to add textfield to table. Then you can rotate table and textfield like below

textfield = new TextField("", skin);

textfield.isTouchFocusListener();

stage.addActor(textfield);

Table table = new Table(skin);

table.rotateBy(90);

table.setTransform(true);

table.add(textfield);

stage.addActor(table);

This topic is closed to new replies.

Advertisement