aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2023-09-09 14:07:49 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2023-09-09 14:07:49 +0300
commitc891cde665a8f10c9264951085173c37e7aad9fe (patch)
tree56a8f15230c8806136af471df553a39475f7b9e2 /src/main
parentb5ab318efb559da0e7b8d3272fd18a2c38655c7d (diff)
downloadLibGui-c891cde665a8f10c9264951085173c37e7aad9fe.tar.gz
LibGui-c891cde665a8f10c9264951085173c37e7aad9fe.tar.bz2
LibGui-c891cde665a8f10c9264951085173c37e7aad9fe.zip
Use GUI sprites for panel textures
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java4
-rw-r--r--src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png (renamed from src/main/resources/assets/libgui/textures/widget/panel_dark.png)bin1644 -> 1644 bytes
-rw-r--r--src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png.mcmeta10
-rw-r--r--src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png (renamed from src/main/resources/assets/libgui/textures/widget/panel_light.png)bin650 -> 650 bytes
-rw-r--r--src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png.mcmeta10
5 files changed, 22 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java b/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java
index 7831f33..a709b64 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java
@@ -41,8 +41,8 @@ public interface BackgroundPainter {
* @since 1.5.0
*/
public static BackgroundPainter VANILLA = createLightDarkVariants(
- createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/panel_light.png")),
- createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/panel_dark.png"))
+ createGuiSprite(new Identifier(LibGuiCommon.MOD_ID, "widget/panel_light")),
+ createGuiSprite(new Identifier(LibGuiCommon.MOD_ID, "widget/panel_dark"))
);
/**
diff --git a/src/main/resources/assets/libgui/textures/widget/panel_dark.png b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png
index c4e643f..c4e643f 100644
--- a/src/main/resources/assets/libgui/textures/widget/panel_dark.png
+++ b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png
Binary files differ
diff --git a/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png.mcmeta b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png.mcmeta
new file mode 100644
index 0000000..0f75440
--- /dev/null
+++ b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png.mcmeta
@@ -0,0 +1,10 @@
+{
+ "gui": {
+ "scaling": {
+ "type": "nine_slice",
+ "width": 16,
+ "height": 16,
+ "border": 4
+ }
+ }
+}
diff --git a/src/main/resources/assets/libgui/textures/widget/panel_light.png b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png
index 8bb50a8..8bb50a8 100644
--- a/src/main/resources/assets/libgui/textures/widget/panel_light.png
+++ b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png
Binary files differ
diff --git a/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png.mcmeta b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png.mcmeta
new file mode 100644
index 0000000..0f75440
--- /dev/null
+++ b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png.mcmeta
@@ -0,0 +1,10 @@
+{
+ "gui": {
+ "scaling": {
+ "type": "nine_slice",
+ "width": 16,
+ "height": 16,
+ "border": 4
+ }
+ }
+}