diff --git a/core/src/me/msoucy/ptures/PTures.java b/core/src/me/msoucy/ptures/PTures.java deleted file mode 100644 index 442a1f6..0000000 --- a/core/src/me/msoucy/ptures/PTures.java +++ /dev/null @@ -1,33 +0,0 @@ -package me.msoucy.ptures; - -import com.badlogic.gdx.ApplicationAdapter; -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.graphics.GL20; -import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.graphics.g2d.SpriteBatch; - -public class PTures extends ApplicationAdapter { - SpriteBatch batch; - Texture img; - - @Override - public void create () { - batch = new SpriteBatch(); - img = new Texture("badlogic.jpg"); - } - - @Override - public void render () { - Gdx.gl.glClearColor(1, 0, 0, 1); - Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - batch.begin(); - batch.draw(img, 0, 0); - batch.end(); - } - - @Override - public void dispose () { - batch.dispose(); - img.dispose(); - } -} diff --git a/core/src/me/msoucy/ptures/PTures.kt b/core/src/me/msoucy/ptures/PTures.kt new file mode 100644 index 0000000..41f8833 --- /dev/null +++ b/core/src/me/msoucy/ptures/PTures.kt @@ -0,0 +1,30 @@ +package me.msoucy.ptures + +import com.badlogic.gdx.ApplicationAdapter +import com.badlogic.gdx.Gdx +import com.badlogic.gdx.graphics.GL20 +import com.badlogic.gdx.graphics.Texture +import com.badlogic.gdx.graphics.g2d.SpriteBatch + +class PTures : ApplicationAdapter() { + internal lateinit var batch: SpriteBatch + internal lateinit var img: Texture + + override fun create() { + batch = SpriteBatch() + img = Texture("badlogic.jpg") + } + + override fun render() { + Gdx.gl.glClearColor(1f, 0f, 0f, 1f) + Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT) + batch.begin() + batch.draw(img, 0f, 0f) + batch.end() + } + + override fun dispose() { + batch.dispose() + img.dispose() + } +} diff --git a/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.java b/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.java deleted file mode 100644 index 290801f..0000000 --- a/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.java +++ /dev/null @@ -1,12 +0,0 @@ -package me.msoucy.ptures.desktop; - -import com.badlogic.gdx.backends.lwjgl.LwjglApplication; -import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; -import me.msoucy.ptures.PTures; - -public class DesktopLauncher { - public static void main (String[] arg) { - LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); - new LwjglApplication(new PTures(), config); - } -} diff --git a/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt b/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt new file mode 100644 index 0000000..2fac773 --- /dev/null +++ b/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt @@ -0,0 +1,13 @@ +package me.msoucy.ptures.desktop + +import com.badlogic.gdx.backends.lwjgl.LwjglApplication +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration +import me.msoucy.ptures.PTures + +object DesktopLauncher { + @JvmStatic + fun main(arg: Array) { + val config = LwjglApplicationConfiguration() + LwjglApplication(PTures(), config) + } +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f4d7b2b..3eff2f5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Tue Nov 05 22:06:13 EST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip