color change a format

This commit is contained in:
gigabit101 2015-08-17 18:44:54 +01:00
parent e8e78c1099
commit 8233f1ec8f
3 changed files with 7 additions and 4 deletions

View file

@ -2,6 +2,8 @@ package techreborn.pda.pages;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import techreborn.init.ModItems; import techreborn.init.ModItems;
import techreborn.pda.PageCollection; import techreborn.pda.PageCollection;
@ -30,8 +32,7 @@ public class ItemsPage extends TitledPage{
if (indexName==null && page instanceof CraftingInfoPage) indexName = ttl(((CraftingInfoPage)page).result.getUnlocalizedName()+".name"); if (indexName==null && page instanceof CraftingInfoPage) indexName = ttl(((CraftingInfoPage)page).result.getUnlocalizedName()+".name");
else if (indexName==null) indexName = page.getReferenceName(); else if (indexName==null) indexName = page.getReferenceName();
int colour = 77777777; int colour = 77777777;
buttonList.add(new GuiButtonTextOnly(999, getXMin()+20+collum*120, getYMin()+20+(row*7), 82, 7, indexName, page.getReferenceName(), 6666666));
buttonList.add(new GuiButtonTextOnly(999, getXMin()+5+collum*81, getYMin()+20+(row*7), 82, 7, indexName, page.getReferenceName(), 6666666));
row++; row++;
if (row > 21){ if (row > 21){
row = 0; row = 0;

View file

@ -1,5 +1,7 @@
package techreborn.pda.util; package techreborn.pda.util;
import java.awt.Color;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -51,7 +53,7 @@ public class GuiButtonTextOnly extends GuiButton{
} }
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(0.7F, 0.7F, 1); GL11.glScalef(0.7F, 0.7F, 1);
fontrenderer.drawString(trimmedDisplayString, (int)(xPosition*1.45), (int)((yPosition + (height - 8) / 2)*1.45), textColour); fontrenderer.drawString(trimmedDisplayString, (int)(xPosition*1.45), (int)((yPosition + (height - 8) / 2)*1.45), Color.WHITE.getRGB());
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After