Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Scene2D is the scene graph library that comes with LibGDX.
3
votes
Accepted
How do I create a ToggleButton via code?
Quoting the javadocs of the Button class:
Each time a button is clicked, the checked state is toggled.
So the buttons are probably checked, you just can't see it. The reason for not being able t …
4
votes
Scene2D set table cell size in percentage of tables ´s size
You can change the Actor that the Value acts on by supplying the actor (in your case your table) in the constructor like so:
table.add(button).width(Value.percentWidth(.75F, table));
This will make V …
3
votes
LibGDX: How to handle Touchpad input?
Why not just use it with a Stage and Table as intended?
Stage stage = new Stage();
Table table = new Table(skin); // You can skip table and add it directly to the stage as well.
Touchpad touchpad = n …
9
votes
Accepted
What is the difference between expand(), grow() and fill() in libGDX?
Expand: expands the cell that the actor is currently placed in to occupy the largest possible area without changing other cells size. For example if the cell is 50 x 50 and there is 50px of empty spac …
1
vote
For loop not detecting Actors in draw method. (libGDX)
Looking at the code you do this:
int est = 0;
...
else if (est == 1) {
batch.draw(test, 400, 90);
}
It doesn't seem like you change the est variable to 1. Because of this the batch will never …
1
vote
Accepted
Why does my libGDX TextureRegion.split code not work properly?
TextureRegion#getTexture() returns the original texture; i.e. the texture that it was split from. Use the actual TextureRegion (in your case, tiles[0][0], not tiles[0][0].getTexture()). Your code shou …
3
votes
Accepted
How to create card layout in a trading card game Libgdx
How does this look? (Green and red lines are only there for debugging)
What I did to achieve this was to first separate the card into three columns and five rows; then I had the Cost, Life, Attack, …