From c891cde665a8f10c9264951085173c37e7aad9fe Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sat, 9 Sep 2023 14:07:49 +0300 Subject: Use GUI sprites for panel textures --- .../cottonmc/cotton/gui/client/BackgroundPainter.java | 4 ++-- .../libgui/textures/gui/sprites/widget/panel_dark.png | Bin 0 -> 1644 bytes .../textures/gui/sprites/widget/panel_dark.png.mcmeta | 10 ++++++++++ .../libgui/textures/gui/sprites/widget/panel_light.png | Bin 0 -> 650 bytes .../textures/gui/sprites/widget/panel_light.png.mcmeta | 10 ++++++++++ .../assets/libgui/textures/widget/panel_dark.png | Bin 1644 -> 0 bytes .../assets/libgui/textures/widget/panel_light.png | Bin 650 -> 0 bytes 7 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png create mode 100644 src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png.mcmeta create mode 100644 src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png create mode 100644 src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png.mcmeta delete mode 100644 src/main/resources/assets/libgui/textures/widget/panel_dark.png delete mode 100644 src/main/resources/assets/libgui/textures/widget/panel_light.png (limited to 'src') 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/gui/sprites/widget/panel_dark.png b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png new file mode 100644 index 0000000..c4e643f Binary files /dev/null and b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_dark.png 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/gui/sprites/widget/panel_light.png b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png new file mode 100644 index 0000000..8bb50a8 Binary files /dev/null and b/src/main/resources/assets/libgui/textures/gui/sprites/widget/panel_light.png 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 + } + } +} diff --git a/src/main/resources/assets/libgui/textures/widget/panel_dark.png b/src/main/resources/assets/libgui/textures/widget/panel_dark.png deleted file mode 100644 index c4e643f..0000000 Binary files a/src/main/resources/assets/libgui/textures/widget/panel_dark.png and /dev/null differ diff --git a/src/main/resources/assets/libgui/textures/widget/panel_light.png b/src/main/resources/assets/libgui/textures/widget/panel_light.png deleted file mode 100644 index 8bb50a8..0000000 Binary files a/src/main/resources/assets/libgui/textures/widget/panel_light.png and /dev/null differ -- cgit