mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-25 20:32:32 +00:00
Change the hardcoded color to be ColorUtils (#313)
This commit is contained in:
1 parent
c327afc9f8
commit
cdbd90be5f
10 files changed
+90
-29
No files matched your search
@@ -50,9 +50,9 @@ public class ArmorExtendedGui extends InventoryEffectRenderer {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
// fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"),
|
||||
// 60, 6, 0x404040);
|
||||
// 60, 6, ColorUtils.inventoryTitle.getColor());
|
||||
// fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"),
|
||||
// 17, (ySize - 96) + 2, 0x404040);
|
||||
// 17, (ySize - 96) + 2, ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import tconstruct.armor.inventory.KnapsackContainer;
|
||||
import tconstruct.armor.player.KnapsackInventory;
|
||||
import tconstruct.client.tabs.InventoryTabKnapsack;
|
||||
import tconstruct.client.tabs.TabRegistry;
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
|
||||
public class KnapsackGui extends InventoryEffectRenderer {
|
||||
|
||||
@@ -48,9 +49,16 @@ public class KnapsackGui extends InventoryEffectRenderer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("inventory.knapsack"), 8, 6, 0x404040);
|
||||
fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("inventory.knapsack"),
|
||||
8,
|
||||
6,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
8,
|
||||
(ySize - 96) + 4,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/knapsack.png");
|
||||
|
||||
@@ -8,6 +8,7 @@ public class ColorUtils {
|
||||
|
||||
public static final ColorResource
|
||||
// spotless:off
|
||||
inventoryTitle = color.rgb("inventoryTitle", "0x404040"),
|
||||
materialName = color.rgb("materialName", "0x404040"),
|
||||
materialDurability = color.rgb("materialDurability", "0x404040"),
|
||||
materialHandleModifier1 = color.rgb("materialHandleModifier1", "0x404040"),
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.lwjgl.opengl.GL12;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.smeltery.inventory.ActiveContainer;
|
||||
import tconstruct.smeltery.inventory.SmelteryContainer;
|
||||
import tconstruct.smeltery.logic.SmelteryLogic;
|
||||
@@ -113,12 +114,16 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
int baseX = 86 + (columns - 3) * 22;
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("crafters.Smeltery"), baseX, 5, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("crafters.Smeltery"),
|
||||
baseX,
|
||||
5,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
baseX + 4,
|
||||
(ySize - 96) + 2,
|
||||
0x404040);
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
|
||||
int cornerX = (width - xSize) / 2 + 36 + (columns - 3) * 22;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
|
||||
@@ -28,6 +28,7 @@ import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.PatternBuilder;
|
||||
import tconstruct.library.modifier.IModifyable;
|
||||
import tconstruct.library.tools.ToolMaterial;
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.library.util.HarvestLevels;
|
||||
import tconstruct.tools.logic.CraftingStationLogic;
|
||||
import tconstruct.util.network.CraftingStationDumpPacket;
|
||||
@@ -176,17 +177,23 @@ public class CraftingStationGui extends GuiContainer implements INEIGuiHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal(logic.chest.get().getInventoryName()), 8, 6, 0x202020);
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal(logic.chest.get().getInventoryName()),
|
||||
8,
|
||||
6,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal(logic.tinkerTable ? "crafters.TinkerTable" : logic.getInvName()),
|
||||
craftingTextLeft + 8,
|
||||
6,
|
||||
0x202020);
|
||||
this.fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), craftingTextLeft + 8, 72, 0x202020);
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
craftingTextLeft + 8,
|
||||
72,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
|
||||
if (logic.tinkerTable) {
|
||||
if (logic.isStackInSlot(0)) // output slot = modified item
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.tools.logic.FrypanLogic;
|
||||
|
||||
public class FrypanGui extends GuiContainer {
|
||||
@@ -21,9 +22,16 @@ public class FrypanGui extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("crafters.Frypan"), 60, 6, 0x404040);
|
||||
fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("crafters.Frypan"),
|
||||
60,
|
||||
6,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
8,
|
||||
(ySize - 96) + 2,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/frypan.png");
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.tools.logic.PartChestLogic;
|
||||
|
||||
public class PartChestGui extends GuiContainer {
|
||||
@@ -23,9 +24,16 @@ public class PartChestGui extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("inventory.PartChest"), 8, 8, 0x404040);
|
||||
fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("inventory.PartChest"),
|
||||
8,
|
||||
8,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
17,
|
||||
(ySize - 96) + 2,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/partchest.png");
|
||||
|
||||
@@ -23,6 +23,7 @@ import tconstruct.library.crafting.PatternBuilder;
|
||||
import tconstruct.library.tools.ArrowMaterial;
|
||||
import tconstruct.library.tools.BowMaterial;
|
||||
import tconstruct.library.tools.ToolMaterial;
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.library.util.HarvestLevels;
|
||||
import tconstruct.library.weaponry.ArrowShaftMaterial;
|
||||
import tconstruct.tools.TinkerTools.MaterialID;
|
||||
@@ -106,16 +107,23 @@ public class PartCrafterGui extends GuiContainer implements INEIGuiHandler {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
if (drawChestPart) {
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("inventory.PatternChest"), 8, 17, 0x404040);
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("inventory.PatternChest"),
|
||||
8,
|
||||
17,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
this.fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("crafters.PartBuilder"), craftingTextLeft + 6, 6, 0x404040);
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("crafters.PartBuilder"),
|
||||
craftingTextLeft + 6,
|
||||
6,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
craftingTextLeft + 8,
|
||||
this.ySize - 96 + 2,
|
||||
0x404040);
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
|
||||
drawMaterialInformation();
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.tools.logic.PatternChestLogic;
|
||||
|
||||
public class PatternChestGui extends GuiContainer {
|
||||
@@ -24,9 +25,16 @@ public class PatternChestGui extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("inventory.PatternChest"), 8, 8, 0x404040);
|
||||
fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("inventory.PatternChest"),
|
||||
8,
|
||||
8,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
17,
|
||||
(ySize - 96) + 2,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/patternchest.png");
|
||||
|
||||
@@ -21,6 +21,7 @@ import tconstruct.TConstruct;
|
||||
import tconstruct.library.client.StencilGuiElement;
|
||||
import tconstruct.library.client.TConstructClientRegistry;
|
||||
import tconstruct.library.crafting.StencilBuilder;
|
||||
import tconstruct.library.util.ColorUtils;
|
||||
import tconstruct.tools.inventory.PatternShaperChestContainer;
|
||||
import tconstruct.tools.logic.StencilTableLogic;
|
||||
import tconstruct.util.network.PatternTablePacket;
|
||||
@@ -63,12 +64,19 @@ public class StencilTableGui extends GuiContainer implements INEIGuiHandler {
|
||||
StatCollector.translateToLocal("inventory.PatternChest"),
|
||||
TEXTURE_WIDTH + 5,
|
||||
17,
|
||||
0x404040);
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("crafters.PatternShaper"), 50, 6, 0x404040);
|
||||
fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("crafters.PatternShaper"),
|
||||
50,
|
||||
6,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"),
|
||||
8,
|
||||
(ySize - 96) + 2,
|
||||
ColorUtils.inventoryTitle.getColor());
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/patternshaper.png");
|
||||
|
||||
Reference in new issue
Block a user