diff options
author | nextdaydelivery <12willettsh@gmail.com> | 2022-03-20 11:37:24 +0000 |
---|---|---|
committer | nextdaydelivery <12willettsh@gmail.com> | 2022-03-20 11:37:24 +0000 |
commit | 72118423d214b964ea9bd3d2a1411c72941c5f90 (patch) | |
tree | 90569b2d1a5fb2b6ac64fcf9141aeec518a8ddfc /src/main/java/io/polyfrost/oneconfig/themes | |
parent | fe04136d705ca5f946ee8353c7f7c67e284c9ca5 (diff) | |
download | OneConfig-72118423d214b964ea9bd3d2a1411c72941c5f90.tar.gz OneConfig-72118423d214b964ea9bd3d2a1411c72941c5f90.tar.bz2 OneConfig-72118423d214b964ea9bd3d2a1411c72941c5f90.zip |
a few small things and a couple GUI starting things
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)"); |