summaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-02-22 14:48:06 -0800
committerElizabeth Alexander Hunt <me@liz.coffee>2026-02-22 14:48:06 -0800
commitc9c7e69714707262e8bdea25853bf33447a57951 (patch)
tree6d1e4b317c7e5896be5d719649c4b6c4df09a93f /core/src/main
downloaddyl-c9c7e69714707262e8bdea25853bf33447a57951.tar.gz
dyl-c9c7e69714707262e8bdea25853bf33447a57951.zip
Initialization
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/java/coffee/liz/dyl/FirstScreen.java45
-rw-r--r--core/src/main/java/coffee/liz/dyl/Main.java11
2 files changed, 56 insertions, 0 deletions
diff --git a/core/src/main/java/coffee/liz/dyl/FirstScreen.java b/core/src/main/java/coffee/liz/dyl/FirstScreen.java
new file mode 100644
index 0000000..4901283
--- /dev/null
+++ b/core/src/main/java/coffee/liz/dyl/FirstScreen.java
@@ -0,0 +1,45 @@
+package coffee.liz.dyl;
+
+import com.badlogic.gdx.Screen;
+
+/** First screen of the application. Displayed after the application is created. */
+public class FirstScreen implements Screen {
+ @Override
+ public void show() {
+ // Prepare your screen here.
+ }
+
+ @Override
+ public void render(float delta) {
+ // Draw your screen here. "delta" is the time since last render in seconds.
+ }
+
+ @Override
+ public void resize(int width, int height) {
+ // If the window is minimized on a desktop (LWJGL3) platform, width and height are 0, which causes problems.
+ // In that case, we don't resize anything, and wait for the window to be a normal size before updating.
+ if(width <= 0 || height <= 0) return;
+
+ // Resize your screen here. The parameters represent the new window size.
+ }
+
+ @Override
+ public void pause() {
+ // Invoked when your application is paused.
+ }
+
+ @Override
+ public void resume() {
+ // Invoked when your application is resumed after pause.
+ }
+
+ @Override
+ public void hide() {
+ // This method is called when another screen replaces this one.
+ }
+
+ @Override
+ public void dispose() {
+ // Destroy screen's assets here.
+ }
+} \ No newline at end of file
diff --git a/core/src/main/java/coffee/liz/dyl/Main.java b/core/src/main/java/coffee/liz/dyl/Main.java
new file mode 100644
index 0000000..24fa3de
--- /dev/null
+++ b/core/src/main/java/coffee/liz/dyl/Main.java
@@ -0,0 +1,11 @@
+package coffee.liz.dyl;
+
+import com.badlogic.gdx.Game;
+
+/** {@link com.badlogic.gdx.ApplicationListener} implementation shared by all platforms. */
+public class Main extends Game {
+ @Override
+ public void create() {
+ setScreen(new FirstScreen());
+ }
+} \ No newline at end of file