Skip to content

Commit

Permalink
Merge branch 'libgdx:master' into tp
Browse files Browse the repository at this point in the history
  • Loading branch information
Frosty-J committed Aug 26, 2021
2 parents 1e2050d + 358153b commit 65ad549
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ public void destroyBody (Body body) {
Array<Fixture> fixtureList = body.getFixtureList();
while(fixtureList.size > 0) {
Fixture fixtureToDelete = fixtureList.removeIndex(0);
this.fixtures.remove(fixtureToDelete.addr).setUserData(null);
fixtureToDelete.setUserData(null);
this.fixtures.remove(fixtureToDelete.addr);
freeFixtures.free(fixtureToDelete);
}

Expand Down
1 change: 1 addition & 0 deletions gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ protected void calculateOffsets () {
float[] glyphPositions = this.glyphPositions.items;

// Check if the cursor has gone out the left or right side of the visible area and adjust renderOffset.
cursor = MathUtils.clamp(cursor, 0, glyphCount - 1);
float distance = glyphPositions[Math.max(0, cursor - 1)] + renderOffset;
if (distance <= 0)
renderOffset -= distance;
Expand Down

0 comments on commit 65ad549

Please sign in to comment.