diff --git a/frontend/android/assets/gameTextures/placeholderThumbnail.png b/frontend/android/assets/gameTextures/placeholderThumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..31ad5582832270ceb3c70ac378a6d5eb701bb6fe Binary files /dev/null and b/frontend/android/assets/gameTextures/placeholderThumbnail.png differ diff --git a/frontend/core/src/com/gameware/game/GameWare.java b/frontend/core/src/com/gameware/game/GameWare.java index a9278adf9b0caec45501ab7f72c8b7eb5c3b714f..cedd96fa0cc6ba1dd6a73c616bc735dfc8f85607 100644 --- a/frontend/core/src/com/gameware/game/GameWare.java +++ b/frontend/core/src/com/gameware/game/GameWare.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.files.FileHandle; +import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.utils.Json; import com.badlogic.gdx.utils.JsonReader; diff --git a/frontend/core/src/com/gameware/game/sprites/Bubble.java b/frontend/core/src/com/gameware/game/sprites/bubbleWrapSprites/Bubble.java similarity index 96% rename from frontend/core/src/com/gameware/game/sprites/Bubble.java rename to frontend/core/src/com/gameware/game/sprites/bubbleWrapSprites/Bubble.java index 5374aac1d3c583254efa52c006195f7d23f4cb58..3374f9be62890cb97d0276440e9f4fe66d2f15cc 100644 --- a/frontend/core/src/com/gameware/game/sprites/Bubble.java +++ b/frontend/core/src/com/gameware/game/sprites/bubbleWrapSprites/Bubble.java @@ -1,4 +1,4 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.bubbleWrapSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Sound; @@ -7,6 +7,8 @@ import com.gameware.game.GameWare; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; + import java.util.ArrayList; import java.util.Random; diff --git a/frontend/core/src/com/gameware/game/sprites/ColorRushButton.java b/frontend/core/src/com/gameware/game/sprites/colorRushSprites/ColorRushButton.java similarity index 94% rename from frontend/core/src/com/gameware/game/sprites/ColorRushButton.java rename to frontend/core/src/com/gameware/game/sprites/colorRushSprites/ColorRushButton.java index 19f7370c90a4af2174cb2317bec51fcf08b13e09..6cf67a14ee76192d457d0d7fbecd2186ae82e60b 100644 --- a/frontend/core/src/com/gameware/game/sprites/ColorRushButton.java +++ b/frontend/core/src/com/gameware/game/sprites/colorRushSprites/ColorRushButton.java @@ -1,4 +1,4 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.colorRushSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Sound; @@ -6,8 +6,9 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; import com.gameware.game.GameWare; +import com.gameware.game.sprites.Sprite; -public class ColorRushButton extends Sprite{ +public class ColorRushButton extends Sprite { private Texture mainTexture; private Texture disabledTexture; private int colorNum; diff --git a/frontend/core/src/com/gameware/game/sprites/ColorRushTarget.java b/frontend/core/src/com/gameware/game/sprites/colorRushSprites/ColorRushTarget.java similarity index 96% rename from frontend/core/src/com/gameware/game/sprites/ColorRushTarget.java rename to frontend/core/src/com/gameware/game/sprites/colorRushSprites/ColorRushTarget.java index cbd0da49b3fa89f4c3c1865376db8fc417dc4192..f637e5eb31241976a364fd9cc47c0ed21511b16d 100644 --- a/frontend/core/src/com/gameware/game/sprites/ColorRushTarget.java +++ b/frontend/core/src/com/gameware/game/sprites/colorRushSprites/ColorRushTarget.java @@ -1,11 +1,12 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.colorRushSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; -public class ColorRushTarget extends Sprite{ +public class ColorRushTarget extends Sprite { private int nextHeight; private Vector3 velocity; private Texture mainTexture; diff --git a/frontend/core/src/com/gameware/game/sprites/Fruit.java b/frontend/core/src/com/gameware/game/sprites/fruitSlicerSprites/Fruit.java similarity index 98% rename from frontend/core/src/com/gameware/game/sprites/Fruit.java rename to frontend/core/src/com/gameware/game/sprites/fruitSlicerSprites/Fruit.java index 6f23461d6e6d6c17f336a96b4554dabcaed60aa2..8489edb2cd8aeed853fac5aa5bdf0c134aa4b618 100644 --- a/frontend/core/src/com/gameware/game/sprites/Fruit.java +++ b/frontend/core/src/com/gameware/game/sprites/fruitSlicerSprites/Fruit.java @@ -1,10 +1,11 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.fruitSlicerSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; public class Fruit extends Sprite { diff --git a/frontend/core/src/com/gameware/game/sprites/SlicingCircle.java b/frontend/core/src/com/gameware/game/sprites/fruitSlicerSprites/SlicingCircle.java similarity index 91% rename from frontend/core/src/com/gameware/game/sprites/SlicingCircle.java rename to frontend/core/src/com/gameware/game/sprites/fruitSlicerSprites/SlicingCircle.java index 7ecfcef2268b8847854779495a05cf79532ee06b..afd921a8bed380ffce1776c462d469e5ab69eeb0 100644 --- a/frontend/core/src/com/gameware/game/sprites/SlicingCircle.java +++ b/frontend/core/src/com/gameware/game/sprites/fruitSlicerSprites/SlicingCircle.java @@ -1,9 +1,10 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.fruitSlicerSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; public class SlicingCircle extends Sprite { private Texture slicingVFX; diff --git a/frontend/core/src/com/gameware/game/sprites/ConfirmationBox.java b/frontend/core/src/com/gameware/game/sprites/pauseStateSprites/ConfirmationBox.java similarity index 94% rename from frontend/core/src/com/gameware/game/sprites/ConfirmationBox.java rename to frontend/core/src/com/gameware/game/sprites/pauseStateSprites/ConfirmationBox.java index 1dd4fd91ce87ed1644a3f7372a95533a0aa370bf..f8760192e28c6d639ddd1cb30bdf60f4f1f3e2b5 100644 --- a/frontend/core/src/com/gameware/game/sprites/ConfirmationBox.java +++ b/frontend/core/src/com/gameware/game/sprites/pauseStateSprites/ConfirmationBox.java @@ -1,9 +1,10 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.pauseStateSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; public class ConfirmationBox extends Sprite { private Texture boxTexture; diff --git a/frontend/core/src/com/gameware/game/sprites/PauseCircle.java b/frontend/core/src/com/gameware/game/sprites/pauseStateSprites/PauseCircle.java similarity index 95% rename from frontend/core/src/com/gameware/game/sprites/PauseCircle.java rename to frontend/core/src/com/gameware/game/sprites/pauseStateSprites/PauseCircle.java index 2f76c7fbe0d2bf51670f0a343a335e6fd1e6d842..9a9fe52ab32ae30fb9e69b38136da64e2b3e6164 100644 --- a/frontend/core/src/com/gameware/game/sprites/PauseCircle.java +++ b/frontend/core/src/com/gameware/game/sprites/pauseStateSprites/PauseCircle.java @@ -1,10 +1,11 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.pauseStateSprites; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; public class PauseCircle extends Sprite { private int radius; diff --git a/frontend/core/src/com/gameware/game/sprites/PauseMenuButton.java b/frontend/core/src/com/gameware/game/sprites/pauseStateSprites/PauseMenuButton.java similarity index 91% rename from frontend/core/src/com/gameware/game/sprites/PauseMenuButton.java rename to frontend/core/src/com/gameware/game/sprites/pauseStateSprites/PauseMenuButton.java index 7b153868fbcf365c114a19ce8588d20f214f0fa3..001e3b3a3f598d1b705db92ebe53b996d8ff2910 100644 --- a/frontend/core/src/com/gameware/game/sprites/PauseMenuButton.java +++ b/frontend/core/src/com/gameware/game/sprites/pauseStateSprites/PauseMenuButton.java @@ -1,8 +1,9 @@ -package com.gameware.game.sprites; +package com.gameware.game.sprites.pauseStateSprites; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; +import com.gameware.game.sprites.Sprite; public class PauseMenuButton extends Sprite { private Texture buttonTexture; diff --git a/frontend/core/src/com/gameware/game/states/PauseState.java b/frontend/core/src/com/gameware/game/states/PauseState.java index b59254c560e0ea6a0267209ed41084fe7188a409..ea14fa950749fc0d048ec2b41000c922e12753c6 100644 --- a/frontend/core/src/com/gameware/game/states/PauseState.java +++ b/frontend/core/src/com/gameware/game/states/PauseState.java @@ -5,10 +5,10 @@ import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.gameware.game.GameWare; -import com.gameware.game.sprites.ConfirmationBox; +import com.gameware.game.sprites.pauseStateSprites.ConfirmationBox; import com.gameware.game.sprites.LoadingText; -import com.gameware.game.sprites.PauseCircle; -import com.gameware.game.sprites.PauseMenuButton; +import com.gameware.game.sprites.pauseStateSprites.PauseCircle; +import com.gameware.game.sprites.pauseStateSprites.PauseMenuButton; import com.gameware.game.states.games.PlayStateUnion; import java.util.ArrayList; @@ -231,5 +231,9 @@ public class PauseState extends State { } @Override - public void reset() { } + public void reset() { + this.needsConfirmation = false; + this.countdownStarted = false; + this.countdownDurationLeft = 3f; + } } diff --git a/frontend/core/src/com/gameware/game/states/games/BubbleWrapState.java b/frontend/core/src/com/gameware/game/states/games/BubbleWrapState.java index b7b15e8670c824336fd8beeab23e55aec8117cd3..334e2e9666604bc00c1fdb4d3d286e408b96d47e 100644 --- a/frontend/core/src/com/gameware/game/states/games/BubbleWrapState.java +++ b/frontend/core/src/com/gameware/game/states/games/BubbleWrapState.java @@ -3,7 +3,7 @@ package com.gameware.game.states.games; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; -import com.gameware.game.sprites.Bubble; +import com.gameware.game.sprites.bubbleWrapSprites.Bubble; import com.gameware.game.states.GameStateManager; import java.util.ArrayList; @@ -30,7 +30,7 @@ public class BubbleWrapState extends PlayStateUnion { super.setPauseButtonWhite(); super.setTotalGameTime(20f); super.setFontColorWhite(); - super.screenshot = new Texture(Gdx.files.internal("gameTextures/BubbleWrap/bubbleWrapPhotoEdit.png")); + super.setThumbnail(new Texture(Gdx.files.internal("gameTextures/BubbleWrap/bubbleWrapPhotoEdit.png"))); background = new Texture(Gdx.files.internal("gameTextures/BubbleWrap/bubblewrap_background.jpg")); unpopped = new Texture(Gdx.files.internal("gameTextures/BubbleWrap/bubble_unpopped_1.png")); diff --git a/frontend/core/src/com/gameware/game/states/games/ColorRushState.java b/frontend/core/src/com/gameware/game/states/games/ColorRushState.java index 17127b6cf3de65a33d3fa39c1f9a24f817aca70a..5ef9088bd3c13037d8b92e6de458cba6ed3b119a 100644 --- a/frontend/core/src/com/gameware/game/states/games/ColorRushState.java +++ b/frontend/core/src/com/gameware/game/states/games/ColorRushState.java @@ -2,8 +2,8 @@ package com.gameware.game.states.games; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; -import com.gameware.game.sprites.ColorRushButton; -import com.gameware.game.sprites.ColorRushTarget; +import com.gameware.game.sprites.colorRushSprites.ColorRushButton; +import com.gameware.game.sprites.colorRushSprites.ColorRushTarget; import com.gameware.game.states.GameStateManager; import java.util.ArrayList; @@ -26,7 +26,7 @@ public class ColorRushState extends PlayStateUnion { public ColorRushState(GameStateManager gsm){ super(gsm); - super.screenshot = new Texture(Gdx.files.internal("gameTextures/ColorRush/colorRushPhotoEdit.png")); + super.setThumbnail(new Texture(Gdx.files.internal("gameTextures/ColorRush/colorRushPhotoEdit.png"))); super.setTotalGameTime(30f); // Creates the background diff --git a/frontend/core/src/com/gameware/game/states/games/FruitSlicerState.java b/frontend/core/src/com/gameware/game/states/games/FruitSlicerState.java index 7861261ce78302b97caa9124f2b1fe968b454b3b..82c2c37dc90197386fd055e25971edc5255642e1 100644 --- a/frontend/core/src/com/gameware/game/states/games/FruitSlicerState.java +++ b/frontend/core/src/com/gameware/game/states/games/FruitSlicerState.java @@ -6,8 +6,8 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; import com.gameware.game.GameWare; -import com.gameware.game.sprites.Fruit; -import com.gameware.game.sprites.SlicingCircle; +import com.gameware.game.sprites.fruitSlicerSprites.Fruit; +import com.gameware.game.sprites.fruitSlicerSprites.SlicingCircle; import com.gameware.game.states.GameStateManager; import java.util.ArrayList; @@ -34,7 +34,9 @@ public class FruitSlicerState extends PlayStateUnion { public FruitSlicerState(GameStateManager gsm) { super(gsm); super.setTotalGameTime(60f); - super.screenshot = new Texture(Gdx.files.internal("gameTextures/FruitSlicer/FruitSlicerPhotoEdit.png")); + super.setThumbnail(new Texture(Gdx.files.internal("gameTextures/FruitSlicer/FruitSlicerPhotoEdit.png"))); + super.setFontColorWhite(); + super.setPauseButtonWhite(); this.sliceWhooshSound = Gdx.audio.newSound(Gdx.files.internal("sfx/FruitSlicerWhooshSound.mp3")); this.sliceSquishSound = Gdx.audio.newSound(Gdx.files.internal("sfx/FruitSlicerSquishSound.mp3")); @@ -78,6 +80,12 @@ public class FruitSlicerState extends PlayStateUnion { this.oldTouchPosition.x = touchX; this.oldTouchPosition.y = touchY; } + + + // Adds new slicing circles if the user is touching + if(Gdx.input.isTouched()) { + this.slicingCircles.add(new SlicingCircle(Gdx.input.getX(), Gdx.graphics.getHeight() - Gdx.input.getY(), this.slicingCircleVFX)); + } } @Override @@ -87,11 +95,6 @@ public class FruitSlicerState extends PlayStateUnion { this.handleInput(); - // Adds new slicing circles if the user is touching - if(Gdx.input.isTouched()) { - this.slicingCircles.add(new SlicingCircle(Gdx.input.getX(), Gdx.graphics.getHeight() - Gdx.input.getY(), this.slicingCircleVFX)); - } - // Updates the slicing circles for(SlicingCircle slicingCircle : this.slicingCircles){ slicingCircle.update(dt); @@ -165,7 +168,7 @@ public class FruitSlicerState extends PlayStateUnion { // Four different emit modes: from left, from right, from entire bottom, and from bottom center with different velocity angles int emitMode = (int) (Math.random() * 4); Fruit fruit; - Texture fruitTexture = this.fruitTextures.get((int) (Math.random() * 20)); + Texture fruitTexture = this.fruitTextures.get((int) (Math.random() * this.fruitTextures.size())); Vector3 velocity = new Vector3(Gdx.graphics.getWidth() * 3 / 4, 0, 0); int x, y, emitAngle; diff --git a/frontend/core/src/com/gameware/game/states/games/PlayStateUnion.java b/frontend/core/src/com/gameware/game/states/games/PlayStateUnion.java index fac9149eefa98a9cb2a777701ce67446ffd1275b..23b18b80c3e99cc3b105c8229b9d1b216692d1af 100644 --- a/frontend/core/src/com/gameware/game/states/games/PlayStateUnion.java +++ b/frontend/core/src/com/gameware/game/states/games/PlayStateUnion.java @@ -51,7 +51,7 @@ public abstract class PlayStateUnion extends State { protected float currentDuration = 0f; // Game objects - protected Texture screenshot = null; + private Texture thumbnail = new Texture(Gdx.files.internal("gameTextures/placeholderThumbnail.png")); private PauseButton pauseButton; private LoadingText loadingText = new LoadingText(); private BitmapFont font; @@ -71,7 +71,7 @@ public abstract class PlayStateUnion extends State { // Default font (black color) font = new BitmapFont(); font.setColor(Color.BLACK); - font.getData().setScale((float) (Gdx.graphics.getWidth()/GameWare.WIDTH*1.75)); + font.getData().setScale((float) (Gdx.graphics.getWidth()/GameWare.WIDTH*2.5)); } // Override methods @@ -127,6 +127,7 @@ public abstract class PlayStateUnion extends State { this.loadingText.dispose(); this.pauseButton.dispose(); this.font.dispose(); + this.thumbnail.dispose(); } @Override @@ -139,12 +140,13 @@ public abstract class PlayStateUnion extends State { if(this.timeLeftVisible && this.totalGameTime > 0f) { sb.begin(); // Time left - this.font.draw(sb, "Time: " + String.valueOf(Math.max(Math.round((this.totalGameTime - this.currentDuration) * 100), 0.00) / 100.0), Gdx.graphics.getWidth() / 40, Gdx.graphics.getHeight() - Gdx.graphics.getHeight() / 40 - Gdx.graphics.getHeight() / 60); + this.font.draw(sb, "Time: " + String.valueOf(Math.max(Math.round((this.totalGameTime - this.currentDuration) * 100), 0.00) / 100.0), Gdx.graphics.getWidth() / 40, Gdx.graphics.getHeight() - Gdx.graphics.getHeight() / 20); sb.end(); } if(this.currentScoreVisible){ sb.begin(); + //Score this.font.draw(sb, "Score: " + String.valueOf(this.score), Gdx.graphics.getWidth() / 40, Gdx.graphics.getHeight() - Gdx.graphics.getHeight() / 100); sb.end(); @@ -260,6 +262,11 @@ public abstract class PlayStateUnion extends State { this.currentDuration = currentDuration; } + public void setThumbnail(Texture thumbnailTexture){ + this.thumbnail.dispose(); + this.thumbnail = thumbnailTexture; + } + // Getters public Color getFontColor(){ return this.font.getColor(); @@ -273,8 +280,8 @@ public abstract class PlayStateUnion extends State { return this.totalGameTime; } - public Texture getScreenshot(){ - return screenshot; + public Texture getThumbnail(){ + return thumbnail; } // Hide and show methods: diff --git a/frontend/core/src/com/gameware/game/states/menus/CreateNewTournamentState.java b/frontend/core/src/com/gameware/game/states/menus/CreateNewTournamentState.java index cdb9f5b44012f26f28118d5f439e147cc8fc6ac2..084040b65f69ce5e06fa609d0eb8318172f42e3f 100644 --- a/frontend/core/src/com/gameware/game/states/menus/CreateNewTournamentState.java +++ b/frontend/core/src/com/gameware/game/states/menus/CreateNewTournamentState.java @@ -187,7 +187,7 @@ public class CreateNewTournamentState extends MenuStateUnion { continue; } - innerTable.add(new Image(GameWare.getInstance().getGameIdToPlayState().get(g.getId()).getScreenshot())).width(imageWidthAndHeigh).height(imageWidthAndHeigh); + innerTable.add(new Image(GameWare.getInstance().getGameIdToPlayState().get(g.getId()).getThumbnail())).width(imageWidthAndHeigh).height(imageWidthAndHeigh); Table innerInnerTable = new Table(); innerInnerTable.defaults().space(spacingLittle); diff --git a/frontend/core/src/com/gameware/game/states/menus/MenuStateUnion.java b/frontend/core/src/com/gameware/game/states/menus/MenuStateUnion.java index f0ec2f8f02206dfdb10422ebcd4ec1e8b00e98f4..e06108f4605bc5cdd5b693132fb5bb13ae74b4cc 100644 --- a/frontend/core/src/com/gameware/game/states/menus/MenuStateUnion.java +++ b/frontend/core/src/com/gameware/game/states/menus/MenuStateUnion.java @@ -34,9 +34,10 @@ import com.gameware.game.states.State; public abstract class MenuStateUnion extends State { // Font - protected final float fontScale = 3f; - protected final float tinierTitleFontBigScale = 1.5f; - protected final float titleFontBigScale = 2.5f; + protected final float scaleRatio = Float.valueOf(Gdx.graphics.getWidth()) / 1080f; + protected final float fontScale = 3f * scaleRatio; + protected final float tinierTitleFontBigScale = 1.5f * scaleRatio; + protected final float titleFontBigScale = 2.5f * scaleRatio; // Spacing protected final float spacingLittle = Gdx.graphics.getHeight()/50; @@ -73,7 +74,10 @@ public abstract class MenuStateUnion extends State { public MenuStateUnion(GameStateManager gsm){ super(gsm); + + // Scales the font according to the ratio between the screen width and the default 1080 width skin.getFont("font").getData().setScale(fontScale); + skin.getFont("font-big").getData().setScale(this.scaleRatio); // Add sound effects this.checkBoxSound = Gdx.audio.newSound(Gdx.files.internal("sfx/check_box.ogg")); diff --git a/frontend/core/src/com/gameware/game/states/menus/SinglePlayerSelectGameState.java b/frontend/core/src/com/gameware/game/states/menus/SinglePlayerSelectGameState.java index b26f2de7dd6e9f670803873dd5bfb8a4de730cce..f64c5afc2a8301d4f3bf430d3717c69835f8af48 100644 --- a/frontend/core/src/com/gameware/game/states/menus/SinglePlayerSelectGameState.java +++ b/frontend/core/src/com/gameware/game/states/menus/SinglePlayerSelectGameState.java @@ -91,7 +91,7 @@ public class SinglePlayerSelectGameState extends MenuStateUnion { if(GameWare.getInstance().getGameIdToPlayState().get(g.getId()) == null){ continue; } - innerTable.add(new Image(GameWare.getInstance().getGameIdToPlayState().get(g.getId()).getScreenshot())).width(imageWidthAndHeigh).height(imageWidthAndHeigh).pad(spacingLittle); + innerTable.add(new Image(GameWare.getInstance().getGameIdToPlayState().get(g.getId()).getThumbnail())).width(imageWidthAndHeigh).height(imageWidthAndHeigh).pad(spacingLittle); Table innerInnerTable = new Table(); innerInnerTable.add(makeTableWithLabelAndQuestionIcon(new Label(g.getName(), skin), makeQuestionIconDialog(new Label(g.getExplanation().replaceAll("\\\\n", "\n"), skin)))).spaceBottom(spacingLittle); diff --git a/frontend/core/src/com/gameware/game/states/menus/ViewHighScoreState.java b/frontend/core/src/com/gameware/game/states/menus/ViewHighScoreState.java index a6747c6a4019e63810df7c85083c0498c0ad8a91..8081cee92b39e8f3ee4753e45ba6810922cca922 100644 --- a/frontend/core/src/com/gameware/game/states/menus/ViewHighScoreState.java +++ b/frontend/core/src/com/gameware/game/states/menus/ViewHighScoreState.java @@ -97,7 +97,7 @@ public class ViewHighScoreState extends MenuStateUnion { if(GameWare.getInstance().getGameIdToPlayState().get(g.getId()) == null){ continue; } - innerTable.add(new Image(GameWare.getInstance().getGameIdToPlayState().get(g.getId()).getScreenshot())).width(imageWidthAndHeigh).height(imageWidthAndHeigh).pad(spacingLittle); + innerTable.add(new Image(GameWare.getInstance().getGameIdToPlayState().get(g.getId()).getThumbnail())).width(imageWidthAndHeigh).height(imageWidthAndHeigh).pad(spacingLittle); Table innerInnerTable = new Table(); innerInnerTable.add(makeTableWithLabelAndQuestionIcon(new Label(g.getName(), skin), makeQuestionIconDialog(new Label(g.getExplanation().replaceAll("\\\\n", "\n"), skin)))).spaceBottom(spacingLittle); diff --git a/frontend/core/src/com/gameware/game/states/menus/ViewTournamentState.java b/frontend/core/src/com/gameware/game/states/menus/ViewTournamentState.java index ce794de22e0d575235fb64f457af52cf567ad3b7..ebfa9b5fb3df6c161c4de711ba70edd3fbfe51b9 100644 --- a/frontend/core/src/com/gameware/game/states/menus/ViewTournamentState.java +++ b/frontend/core/src/com/gameware/game/states/menus/ViewTournamentState.java @@ -121,7 +121,7 @@ public class ViewTournamentState extends MenuStateUnion { currentRoundTable.setBackground(backgroundTableBlueRounded); currentRoundTable.add(new Label("This round:\n\n"+gameName,skin)).space(spacingLittle); PlayStateUnion state = GameWare.getInstance().getGameIdToPlayState().get(round.getGameId()); - currentRoundTable.add(new Image(state.getScreenshot())).width(imageWidthAndHeigh).height(imageWidthAndHeigh).spaceBottom(spacingMedium).colspan(2); + currentRoundTable.add(new Image(state.getThumbnail())).width(imageWidthAndHeigh).height(imageWidthAndHeigh).spaceBottom(spacingMedium).colspan(2); rootTable.add(currentRoundTable).maxHeight(Gdx.graphics.getHeight()/5).colspan(2); rootTable.row(); @@ -139,7 +139,7 @@ public class ViewTournamentState extends MenuStateUnion { rootTable.add(innerTable).colspan(2); rootTable.row(); rootTable.add(makeBackBtn()).expand().bottom().left(); - roundDeadline.setFontScale(0.8f); + roundDeadline.setFontScale(0.8f * super.scaleRatio); rootTable.add(roundDeadline).expand().bottom().right(); stage.addActor(rootTable);