Skip to main content
Don't repeat tags in title
Link
DMGregory
  • 136.3k
  • 22
  • 247
  • 373

Libgdx Scene2D Table background not showing up

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
fixed spelling errors & tightened prose
Source Link
Pikalek
  • 12.5k
  • 5
  • 45
  • 52

Libgdx Scene2D Table background not whowingshowing up

I am using Libgdx's Scene2D API to build bymy UI and everything has been working as expected until now. I created a Skin and a TextureAtlas and linked them as so:

And Finally, I added a Label to the Table:

Once I added the Table to my Stage, only the elements in it would show up and not the background image. I tried using background(String s), setBackground(String s), background(Drawable d), and setBackground(Drawable d). None of those 4 methods seemed to work for me.

I also tried calling pack() and setFillParent(true) but both of those made my table disappear. I have gone through just about every Google result and I can't find anyone else with my issue.

More info

Here is my uiskin.jsonuiskin.json file

Libgdx Scene2D Table background not whowing up

I am using Libgdx's Scene2D API to build by UI and everything has been working as expected until now. I created a Skin and a TextureAtlas and linked them as so:

And Finally I added a Label to the Table:

Once I added the Table to my Stage, only the elements in it would show up and not the background image. I tried using background(String s), setBackground(String s), background(Drawable d), and setBackground(Drawable d). None of those 4 methods seemed to work for me.

I also tried calling pack() and setFillParent(true) but both of those made my table disappear. I have gone through just about every Google result and I can't find anyone else with my issue.

More info

Here is my uiskin.json file

Libgdx Scene2D Table background not showing up

I am using Libgdx's Scene2D API to build my UI and everything has been working as expected until now. I created a Skin and a TextureAtlas and linked them as so:

Finally, I added a Label to the Table:

Once I added the Table to my Stage, only the elements in it would show up and not the background image. I tried using background(String s), setBackground(String s), background(Drawable d), and setBackground(Drawable d). None of those seemed to work for me.

I also tried calling pack() and setFillParent(true) but both of those made my table disappear. I have gone through just about every Google result and I can't find anyone else with my issue.

Here is my uiskin.json file

Bumped by Community user
Bumped by Community user
Bumped by Community user
Tweeted twitter.com/StackGameDev/status/1000277650932461568
Bumped by Community user
Bumped by Community user
Bumped by Community user