diff options
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/themes')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java | 12 | ||||
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/themes/textures/TickableTexture.java | 2 |
2 files changed, 12 insertions, 2 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 9b583ef..4729d6c 100644 --- a/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java +++ b/src/main/java/io/polyfrost/oneconfig/themes/textures/TextureManager.java @@ -67,7 +67,7 @@ public class TextureManager { } /** - * Draw the specified icon at the coordinates, scaled to the width and height. + * Draw the specified {@link ThemeElement} at the coordinates, scaled to the width and height. * * @param element element to draw * @param x x coordinate (top left) @@ -99,4 +99,14 @@ 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) + */ + public void draw(@NotNull ThemeElement element, int x, int y) { + this.draw(element, x, y, element.size, element.size); + } } diff --git a/src/main/java/io/polyfrost/oneconfig/themes/textures/TickableTexture.java b/src/main/java/io/polyfrost/oneconfig/themes/textures/TickableTexture.java index b9882d0..e825be9 100644 --- a/src/main/java/io/polyfrost/oneconfig/themes/textures/TickableTexture.java +++ b/src/main/java/io/polyfrost/oneconfig/themes/textures/TickableTexture.java @@ -42,7 +42,7 @@ public class TickableTexture { frametime = jsonObject.get("frametime").getAsInt(); if (frametime == 0) { frametime = 1; - themeLog.warn("You cannot have a frame tick time of 0. This will mean there is no animation as it will happen way too fast. Defaulting to 1, as we assume you wanted it fast."); + themeLog.warn("You cannot have a frame tick time of 0. This will mean there is no animation as it will happen impossibly fast. Defaulting to 1, as we assume you wanted it fast."); } } catch (Exception e) { themeLog.error("failed to load metadata for tickable texture (" + element.location + "). Setting default (5)"); |