Skip to content

Commit 779d5f6

Browse files
committed
Tweak GuiLabel docs
1 parent fa95cf0 commit 779d5f6

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

src/main/java/com/falsepattern/lib/compat/GuiLabel.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,39 @@
1313
import net.minecraft.client.resources.I18n;
1414
import org.lwjgl.opengl.GL11;
1515

16+
/**
17+
* A functional equivalent to GuiLabel present in Minecraft 1.12
18+
*/
1619
@SideOnly(Side.CLIENT)
1720
public class GuiLabel extends Gui {
1821
private final List<String> lines = new ArrayList<>();
1922
private final FontRenderer fontRenderer;
2023
private final int textColor;
2124

2225
private boolean centered = false;
26+
/**
27+
* The label width.
28+
*/
2329
protected int width;
30+
/**
31+
* The label height.
32+
*/
2433
protected int height;
34+
/**
35+
* The id of the label.
36+
*/
2537
public int id;
38+
/**
39+
* The x position of the label.
40+
*/
2641
public int x;
42+
/**
43+
* The y position of the label.
44+
*/
2745
public int y;
46+
/**
47+
* The visibility of the label.
48+
*/
2849
public boolean visible = true;
2950

3051
/**
@@ -51,7 +72,7 @@ public GuiLabel(@NonNull FontRenderer fontRenderer, int id, int x, int y, int wi
5172
/**
5273
* Add a line of text to the GuiLabel.
5374
*
54-
* @param text string to add.
75+
* @param text string to add
5576
*/
5677
public void addLine(@NonNull String text) {
5778
lines.add(I18n.format(text));
@@ -60,7 +81,7 @@ public void addLine(@NonNull String text) {
6081
/**
6182
* Sets the label text to render centred with respect to the x and y.
6283
*
63-
* @return the GuiLabel.
84+
* @return the GuiLabel itself
6485
*/
6586
public GuiLabel setCentered() {
6687
centered = true;

0 commit comments

Comments
 (0)