diff options
| author | ilotterytea <iltsu@alright.party> | 2024-06-08 22:48:58 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-06-09 19:27:32 +0500 |
| commit | 523cad4ec547fe4ac6be8ff0281ab3af78a130d1 (patch) | |
| tree | b716b8a30c3048a72e36bd2363870475a101011b /core/src/kz/ilotterytea/maxon/MaxonConstants.java | |
| parent | 604832dddef852a0a874b9dfbf3540a8a56736c0 (diff) | |
feat: missing texture
Diffstat (limited to 'core/src/kz/ilotterytea/maxon/MaxonConstants.java')
| -rw-r--r-- | core/src/kz/ilotterytea/maxon/MaxonConstants.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/src/kz/ilotterytea/maxon/MaxonConstants.java b/core/src/kz/ilotterytea/maxon/MaxonConstants.java index 298e6d8..c9f7878 100644 --- a/core/src/kz/ilotterytea/maxon/MaxonConstants.java +++ b/core/src/kz/ilotterytea/maxon/MaxonConstants.java @@ -2,6 +2,9 @@ package kz.ilotterytea.maxon; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.Pixmap; +import com.badlogic.gdx.graphics.Texture; import kz.ilotterytea.maxon.utils.OsUtils; import java.text.DecimalFormat; @@ -36,4 +39,27 @@ public class MaxonConstants { public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/M/yyyy hh:mm:ss"); public static final long startTime = System.currentTimeMillis(); + public static final Texture MISSING_TEXTURE; + + static { + Pixmap pixmap = new Pixmap(4, 4, Pixmap.Format.RGBA8888); + + int checkers = 2; + int tileSize = pixmap.getWidth() / checkers; + + for (int y = 0; y < checkers; y++) { + for (int x = 0; x < checkers; x++) { + if ((x + y) % 2 == 0){ + pixmap.setColor(Color.MAGENTA); + } else { + pixmap.setColor(Color.BLACK); + } + + pixmap.fillRectangle(x * tileSize, y * tileSize, tileSize, tileSize); + } + } + + MISSING_TEXTURE = new Texture(pixmap); + pixmap.dispose(); + } } |
