aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-03-21 14:48:22 +0700
committerGitHub <noreply@github.com>2022-03-21 08:48:22 +0100
commit2696141f9790fd6c8d3df1148f46d298512c4902 (patch)
treeb05082fdb69de516ec34f07012055ac82dd0bb09 /src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java
parent72118423d214b964ea9bd3d2a1411c72941c5f90 (diff)
downloadOneConfig-2696141f9790fd6c8d3df1148f46d298512c4902.tar.gz
OneConfig-2696141f9790fd6c8d3df1148f46d298512c4902.tar.bz2
OneConfig-2696141f9790fd6c8d3df1148f46d298512c4902.zip
stuff (#1)
* new: use archloom instead of forgegradle * misc: reformat code * update archloom
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java b/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java
index 4729d6c..a2e96d4 100644
--- a/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java
+++ b/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java
@@ -46,7 +46,7 @@ public class TextureManager {
if (img.getWidth() != element.size) {
themeLog.warn("Theme element " + element.name() + " with size " + img.getWidth() + "px is not recommended, expected " + element.size + "px. Continuing anyway.");
}
- if(element.ordinal() < 26) {
+ if (element.ordinal() < 26) {
if (img.getWidth() != img.getHeight()) {
themeLog.info("found tickable animated texture (" + element.name() + "). Loading texture");
try {
@@ -57,8 +57,8 @@ public class TextureManager {
}
}
} else {
- if(element.ordinal() < 29) {
- if(img.getHeight() != 144 || img.getWidth() != 758) {
+ if (element.ordinal() < 29) {
+ if (img.getHeight() != 144 || img.getWidth() != 758) {
themeLog.warn("found badly sized button texture " + element.location);
}
}
@@ -102,9 +102,10 @@ public class TextureManager {
/**
* Draw the specified {@link ThemeElement} at the coordinates, using its recommended width and height.
+ *
* @param element element to draw
- * @param x x coordinate (top left)
- * @param y y coordinate (top left)
+ * @param x x coordinate (top left)
+ * @param y y coordinate (top left)
*/
public void draw(@NotNull ThemeElement element, int x, int y) {
this.draw(element, x, y, element.size, element.size);