From dc48a30a3205967bdc1bcdea33a155ee4a3ddc87 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Thu, 27 May 2021 19:54:24 +0300 Subject: Improve BackgroundPainter javadoc about 9patch --- .../cottonmc/cotton/gui/client/BackgroundPainter.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 113464c..47b106f 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 @@ -16,6 +16,17 @@ import java.util.function.Consumer; /** * Background painters are used to paint the background of a widget. * The background painter instance of a widget can be changed to customize the look of a widget. + * + *
Nine-patch background painters are created using {@link #createNinePatch(Identifier)} or + * {@link #createNinePatch(Texture, Consumer)}. The latter lets you customise the look of + * the background more finely. */ @FunctionalInterface public interface BackgroundPainter { @@ -28,7 +39,7 @@ public interface BackgroundPainter { public void paintBackground(MatrixStack matrices, int left, int top, WWidget panel); /** - * The {@code VANILLA} background painter draws a vanilla-like gui panel using {@linkplain NinePatch nine-patch textures}. + * The {@code VANILLA} background painter draws a vanilla-like GUI panel using nine-patch textures. * *
This background painter uses {@code libgui:textures/widget/panel_light.png} as the light texture and * {@code libgui:textures/widget/panel_dark.png} as the dark texture. -- cgit