From 779d5f635bdd8924b16e84f301bd8af152377c48 Mon Sep 17 00:00:00 2001 From: basdxz Date: Tue, 31 May 2022 12:30:22 +0100 Subject: [PATCH] Tweak GuiLabel docs --- .../com/falsepattern/lib/compat/GuiLabel.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/falsepattern/lib/compat/GuiLabel.java b/src/main/java/com/falsepattern/lib/compat/GuiLabel.java index 94fb7fc..cef242c 100644 --- a/src/main/java/com/falsepattern/lib/compat/GuiLabel.java +++ b/src/main/java/com/falsepattern/lib/compat/GuiLabel.java @@ -13,6 +13,9 @@ import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.resources.I18n; import org.lwjgl.opengl.GL11; +/** + * A functional equivalent to GuiLabel present in Minecraft 1.12 + */ @SideOnly(Side.CLIENT) public class GuiLabel extends Gui { private final List lines = new ArrayList<>(); @@ -20,11 +23,29 @@ public class GuiLabel extends Gui { private final int textColor; private boolean centered = false; + /** + * The label width. + */ protected int width; + /** + * The label height. + */ protected int height; + /** + * The id of the label. + */ public int id; + /** + * The x position of the label. + */ public int x; + /** + * The y position of the label. + */ public int y; + /** + * The visibility of the label. + */ public boolean visible = true; /** @@ -51,7 +72,7 @@ public class GuiLabel extends Gui { /** * Add a line of text to the GuiLabel. * - * @param text string to add. + * @param text string to add */ public void addLine(@NonNull String text) { lines.add(I18n.format(text)); @@ -60,7 +81,7 @@ public class GuiLabel extends Gui { /** * Sets the label text to render centred with respect to the x and y. * - * @return the GuiLabel. + * @return the GuiLabel itself */ public GuiLabel setCentered() { centered = true;