Spriggsy
Spriggsy

Reputation: 306

Libgdx scene2d window title size

After setting up a scene2d window and setting a title, id like to be able to adjust the height of the title bar.

If thats not possible is there a way of finding the current height of the bar? as this would make placing tables and other actors within it a lot easier?

Upvotes: 1

Views: 1633

Answers (3)

Will Iverson
Will Iverson

Reputation: 2069

You can change the height of the back of the title bar by modifying the 9 patch graphic used for the background of the window. It's just the top of the window image.

The title available via window.getTitleLabel() is the text label placed on top of the top of the underlying window graphic.

Upvotes: 0

wovh
wovh

Reputation: 1

you can get the title label through window.getTitleLabel(), then modify it.

Upvotes: -1

Ocfmem
Ocfmem

Reputation: 356

You actor will always be added bellow the title bar, you can adjust using padTop(). To change the title bar size you can change the font of the title size.

I never found a better way to manage this.

Upvotes: -1

Related Questions