11package com .falsepattern .lib .compat ;
22
33import com .google .common .collect .Lists ;
4+
45import java .util .List ;
56
67import cpw .mods .fml .relauncher .Side ;
1314import org .lwjgl .opengl .GL11 ;
1415
1516@ SideOnly (Side .CLIENT )
16- public class GuiLabel extends Gui
17- {
17+ public class GuiLabel extends Gui {
1818 protected int width ;
1919 protected int height ;
2020 public int x ;
@@ -31,8 +31,7 @@ public class GuiLabel extends Gui
3131 private final FontRenderer fontRenderer ;
3232 private final int border ;
3333
34- public GuiLabel (FontRenderer fontRendererObj , int p_i45540_2_ , int p_i45540_3_ , int p_i45540_4_ , int p_i45540_5_ , int p_i45540_6_ , int p_i45540_7_ )
35- {
34+ public GuiLabel (FontRenderer fontRendererObj , int p_i45540_2_ , int p_i45540_3_ , int p_i45540_4_ , int p_i45540_5_ , int p_i45540_6_ , int p_i45540_7_ ) {
3635 this .fontRenderer = fontRendererObj ;
3736 this .id = p_i45540_2_ ;
3837 this .x = p_i45540_3_ ;
@@ -49,49 +48,39 @@ public GuiLabel(FontRenderer fontRendererObj, int p_i45540_2_, int p_i45540_3_,
4948 this .border = 0 ;
5049 }
5150
52- public void addLine (String p_175202_1_ )
53- {
51+ public void addLine (String p_175202_1_ ) {
5452 this .labels .add (I18n .format (p_175202_1_ ));
5553 }
5654
5755 /**
5856 * Sets the Label to be centered
5957 */
60- public GuiLabel setCentered ()
61- {
58+ public GuiLabel setCentered () {
6259 this .centered = true ;
6360 return this ;
6461 }
6562
66- public void drawLabel (Minecraft mc , int mouseX , int mouseY )
67- {
68- if (this .visible )
69- {
63+ public void drawLabel (Minecraft mc , int mouseX , int mouseY ) {
64+ if (this .visible ) {
7065 GL11 .glEnable (GL11 .GL_BLEND );
7166 OpenGlHelper .glBlendFunc (770 , 771 , 1 , 0 );
7267 GL11 .glBlendFunc (GL11 .GL_SRC_ALPHA , GL11 .GL_ONE_MINUS_SRC_ALPHA );
7368 this .drawLabelBackground (mc , mouseX , mouseY );
7469 int i = this .y + this .height / 2 + this .border / 2 ;
7570 int j = i - this .labels .size () * 10 / 2 ;
7671
77- for (int k = 0 ; k < this .labels .size (); ++k )
78- {
79- if (this .centered )
80- {
72+ for (int k = 0 ; k < this .labels .size (); ++k ) {
73+ if (this .centered ) {
8174 this .drawCenteredString (this .fontRenderer , this .labels .get (k ), this .x + this .width / 2 , j + k * 10 , this .textColor );
82- }
83- else
84- {
75+ } else {
8576 this .drawString (this .fontRenderer , this .labels .get (k ), this .x , j + k * 10 , this .textColor );
8677 }
8778 }
8879 }
8980 }
9081
91- protected void drawLabelBackground (Minecraft mcIn , int mouseX , int mouseY )
92- {
93- if (this .labelBgEnabled )
94- {
82+ protected void drawLabelBackground (Minecraft mcIn , int mouseX , int mouseY ) {
83+ if (this .labelBgEnabled ) {
9584 int i = this .width + this .border * 2 ;
9685 int j = this .height + this .border * 2 ;
9786 int k = this .x - this .border ;
0 commit comments