From f644386586106e10d6eb98025d21e5706b54e53a Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Thu, 30 Apr 2020 11:22:21 +0200 Subject: [PATCH] =?UTF-8?q?Legger=20til=20tekst=20p=C3=A5=20CardChoiceScre?= =?UTF-8?q?en=20om=20=C3=A5=20bruke=20TAB=20for=20=C3=A5=20vise=20brettet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roborally/gamewrapper/screens/CardChoiceScreen.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/CardChoiceScreen.java b/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/CardChoiceScreen.java index b0aeb63..badb1f3 100644 --- a/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/CardChoiceScreen.java +++ b/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/CardChoiceScreen.java @@ -161,8 +161,8 @@ public class CardChoiceScreen extends InteractiveScreen implements Screen { */ private void generateCards(ProgrammingCardDeck deck) { List cardList = deck.getCards(); - float cardWidth = viewport.getWorldWidth() / 3; - float cardHeight = (viewport.getWorldHeight() - 30) / 3; + float cardWidth = viewport.getWorldWidth() / 3.2f; + float cardHeight = (viewport.getWorldHeight() - 30) / 3.2f; for (int i = 0; i < cardList.size(); i++) { ProgrammingCard programmingCard = cardList.get(i); generateCardRectangle(i, cardWidth, cardHeight, programmingCard, true); @@ -211,6 +211,8 @@ public class CardChoiceScreen extends InteractiveScreen implements Screen { renderCards(); shapeRenderer.end(); roboRallyWrapper.batch.begin(); + roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Press TAB to toggle the board", 10, + viewport.getWorldHeight() - 50); renderCardText(); roboRallyWrapper.batch.end(); stage.draw(); @@ -255,7 +257,7 @@ public class CardChoiceScreen extends InteractiveScreen implements Screen { private void renderCardText() { roboRallyWrapper.font.setColor(YELLOW); for (CardRectangle cardRectangle : cardRectangles) { - roboRallyWrapper.font.getData().setScale(0.8f); + roboRallyWrapper.font.getData().setScale(0.7f); GlyphLayout layout = new GlyphLayout(roboRallyWrapper.font, Integer.toString(cardRectangle.card.getPriority())); float fontX = (int) (cardRectangle.rectangle.x + (cardRectangle.rectangle.width - layout.width) - 28);