diff --git a/core/assets/clicktostart.png b/core/assets/clicktostart.png new file mode 100644 index 0000000..2c526b6 Binary files /dev/null and b/core/assets/clicktostart.png differ diff --git a/core/src/view/Titlescreen.java b/core/src/view/Titlescreen.java index d2b0b68..d62fe01 100644 --- a/core/src/view/Titlescreen.java +++ b/core/src/view/Titlescreen.java @@ -10,7 +10,9 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; /** @@ -19,8 +21,18 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch; */ public class Titlescreen extends AbstractScreen{ + BitmapFont font; + SpriteBatch batch; + + Sprite clicktostart; + public Titlescreen(Game game){ super(game); + + batch = new SpriteBatch(); + clicktostart = new Sprite(new Texture(Gdx.files.internal("clicktostart.png"))); + clicktostart.setX(Gdx.graphics.getWidth() / 2 - clicktostart.getWidth() / 2); + clicktostart.setY(Gdx.graphics.getHeight() / 2 - clicktostart.getHeight() / 2); } @Override @@ -32,13 +44,7 @@ public class Titlescreen extends AbstractScreen{ Gdx.gl.glClearColor(1f, 1f, 1f, 1f); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - - - BitmapFont font = new BitmapFont(); - font.setColor(Color.RED); - SpriteBatch batch = new SpriteBatch(); batch.begin(); - font.draw(batch, "TITLESCREEN", 250, 250); batch.end(); if(Gdx.input.justTouched()){ diff --git a/desktop/src/com/throwgame/main/desktop/DesktopLauncher.java b/desktop/src/com/throwgame/main/desktop/DesktopLauncher.java index aff815f..116994e 100644 --- a/desktop/src/com/throwgame/main/desktop/DesktopLauncher.java +++ b/desktop/src/com/throwgame/main/desktop/DesktopLauncher.java @@ -8,6 +8,9 @@ import controller.Controller; public class DesktopLauncher { public static void main (String[] arg) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); + //config.fullscreen = true; + config.height = 720; + config.width = 1280; new LwjglApplication(new Main(), config); } }