Skip to content

Commit

Permalink
Centered the necessary labels and buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
fattyhope committed Sep 11, 2023
1 parent 6c92ceb commit ef1e65c
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public void clicked(InputEvent event, float x, float y) {
}
});

table.add(message).row();
table.add(turretsPicked).row();

// Centered the message and turrets label
table.add(message).center().colspan(4).row();
table.add(turretsPicked).center().colspan(4).row();
int towersPerRow = 4; // Set the number of towers to display per row
int numRows = (int) Math.ceil((double)turretList.size() / towersPerRow); // Calculate the number of rows

Expand Down Expand Up @@ -133,7 +133,8 @@ public void clicked(InputEvent event, float x, float y) {
table.row(); // Start a new row
}

table.add(confirmButton).padBottom(20).row();
// Centered the "continue" button
table.add(confirmButton).center().colspan(4).padBottom(20).row();

// Center the table within the stage
table.center();
Expand Down

0 comments on commit ef1e65c

Please sign in to comment.