Skip to content

Commit

Permalink
changed display sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
nawal-0 committed Sep 10, 2023
1 parent a67ea57 commit a52a78b
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ private void addActors() {
table = new Table();
table.top().left();
table.setFillParent(true);
table.padTop(50f).padLeft(20f);
table.padTop(100f).padLeft(20f);

scrapsTb = createButton("images/economy/scrapBanner.png",
ServiceLocator.getCurrencyService().getScrap().getAmount());
crystalsTb = createButton("images/economy/crystalBanner.png",
ServiceLocator.getCurrencyService().getCrystal().getAmount());

table.add(scrapsTb);
table.add(crystalsTb);
table.add(scrapsTb).width(scrapsTb.getWidth() * 0.5f).height(scrapsTb.getHeight() * 0.5f);
table.add(crystalsTb).width(crystalsTb.getWidth() * 0.5f).height(crystalsTb.getHeight() * 0.5f);
stage.addActor(table);
}

Expand All @@ -69,10 +69,9 @@ private TextButton createButton(String imageFilePath, int value) {
TextButton tb = new TextButton(String.format("%d", value), style);
tb.setDisabled(true);
tb.getLabel().setAlignment(Align.right);
tb.getLabel().setFontScale(2, 2); // font size
tb.pad(0, 0, 0, 70);

tb.pad(0, 0, 0, 50);
tb.setTransform(true);
tb.setScale(0.5f); // button size

return tb;
}
Expand Down

0 comments on commit a52a78b

Please sign in to comment.