From 2a283a7c07ab4f304c507437b120d0f2522e75f3 Mon Sep 17 00:00:00 2001 From: damios Date: Sat, 2 Mar 2024 11:23:29 +0100 Subject: [PATCH] Minor changes to make the PR more consistent with the rest of the codebase --- src/main/java/de/eskalon/commons/screen/ManagedScreen.java | 7 ++++--- .../commons/screen/transition/ScreenTransition.java | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/eskalon/commons/screen/ManagedScreen.java b/src/main/java/de/eskalon/commons/screen/ManagedScreen.java index edc8859..73d2e57 100644 --- a/src/main/java/de/eskalon/commons/screen/ManagedScreen.java +++ b/src/main/java/de/eskalon/commons/screen/ManagedScreen.java @@ -15,6 +15,8 @@ package de.eskalon.commons.screen; +import javax.annotation.Nullable; + import com.badlogic.gdx.Application; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.InputProcessor; @@ -22,7 +24,6 @@ import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.utils.Array; -import com.badlogic.gdx.utils.Null; import com.badlogic.gdx.utils.viewport.Viewport; import de.eskalon.commons.core.ManagedGame; @@ -215,9 +216,9 @@ public Array getInputProcessors() { /** * @return the color to clear the screen with before the rendering is - * started, or null to not clear the screen + * started, or {@code null} to not clear the screen */ - public @Null Color getClearColor() { + public @Nullable Color getClearColor() { return Color.BLACK; } diff --git a/src/main/java/de/eskalon/commons/screen/transition/ScreenTransition.java b/src/main/java/de/eskalon/commons/screen/transition/ScreenTransition.java index e16e684..591ca6b 100644 --- a/src/main/java/de/eskalon/commons/screen/transition/ScreenTransition.java +++ b/src/main/java/de/eskalon/commons/screen/transition/ScreenTransition.java @@ -15,12 +15,13 @@ package de.eskalon.commons.screen.transition; +import javax.annotation.Nullable; + import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.utils.Disposable; -import com.badlogic.gdx.utils.Null; import de.eskalon.commons.screen.ManagedScreen; import de.eskalon.commons.screen.ScreenManager; @@ -116,9 +117,9 @@ public abstract void render(float delta, TextureRegion lastScreen, /** * @return the color to clear the screen with before the rendering is - * started, or null to not clear the screen + * started, or {@code null} to not clear the screen */ - public @Null Color getClearColor() { + public @Nullable Color getClearColor() { return Color.BLACK; }