diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-04-25 13:12:22 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-04-25 13:12:22 +0100 |
commit | 89d6576a7777a2949e04b2c6c8d2eb015a733529 (patch) | |
tree | 1a6906f9c71591aacbcbf5a32a1a1ed582b95fcb /src/main/java/io/polyfrost/oneconfig/lwjgl/image | |
parent | 29156d83c4213e319149fa5e0a926dd913404528 (diff) | |
download | OneConfig-89d6576a7777a2949e04b2c6c8d2eb015a733529.tar.gz OneConfig-89d6576a7777a2949e04b2c6c8d2eb015a733529.tar.bz2 OneConfig-89d6576a7777a2949e04b2c6c8d2eb015a733529.zip |
add size, do some config element stuff, fixes for cards, finish mods page and performance page, cleanup and some more
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/lwjgl/image')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/lwjgl/image/Image.java | 1 | ||||
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/lwjgl/image/ImageLoader.java | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Image.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Image.java index 2ed7276..b304624 100644 --- a/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Image.java +++ b/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Image.java @@ -5,6 +5,7 @@ import java.nio.ByteBuffer; public class Image { private final int reference; private final ByteBuffer buffer; + public Image(int reference, ByteBuffer buffer) { this.reference = reference; this.buffer = buffer; diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/image/ImageLoader.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/image/ImageLoader.java index 4a35959..3415ea9 100644 --- a/src/main/java/io/polyfrost/oneconfig/lwjgl/image/ImageLoader.java +++ b/src/main/java/io/polyfrost/oneconfig/lwjgl/image/ImageLoader.java @@ -7,14 +7,11 @@ import org.lwjgl.nanovg.NSVGImage; import org.lwjgl.nanovg.NanoSVG; import org.lwjgl.nanovg.NanoVG; import org.lwjgl.stb.STBImage; -import org.lwjgl.system.MemoryStack; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.charset.StandardCharsets; import java.util.HashMap; public class ImageLoader { @@ -45,7 +42,7 @@ public class ImageLoader { } public boolean loadSVGImage(String fileName) { - if(!NSVGImageHashMap.containsKey(fileName)) { + if (!NSVGImageHashMap.containsKey(fileName)) { try { InputStream inputStream = Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation("oneconfig", fileName)).getInputStream(); StringBuilder resultStringBuilder = new StringBuilder(); |