Fixes #1399
This commit is contained in:
parent
677fa7765c
commit
2cb5645806
2 changed files with 15 additions and 7 deletions
|
@ -29,6 +29,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.tile.IUpgradeable;
|
||||
|
@ -38,6 +39,8 @@ import techreborn.client.gui.slot.GuiSlotConfiguration;
|
|||
import techreborn.client.gui.widget.GuiButtonPowerBar;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Prospector
|
||||
|
@ -150,6 +153,18 @@ public class GuiBase extends GuiContainer {
|
|||
if(showSlotConfig){
|
||||
GuiSlotConfiguration.draw(this, mouseX, mouseY);
|
||||
}
|
||||
|
||||
int offset = 0;
|
||||
if(!upgrades){
|
||||
offset = 80;
|
||||
}
|
||||
if (builder.isInRect(guiLeft - 19, guiTop + 92 - offset, 12, 12, mouseX, mouseY)) {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("Configure slots");
|
||||
GuiUtils.drawHoveringText(list,-5, guiTop + 70 - offset, width, height, -1, mc.fontRenderer);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.color(1, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -409,13 +409,6 @@ public class TRBuilder extends GuiBuilder {
|
|||
Minecraft.getMinecraft().getTextureManager().bindTexture(GUI_SHEET);
|
||||
gui.drawTexturedModalRect(posX - 26, posY + 84 - offset, 157, 148, 30, 30);
|
||||
renderItemStack(new ItemStack(ModItems.WRENCH), posX - 19, posY + 92 - offset);
|
||||
if (isInRect(posX - 19, posY + 92 - offset, 12, 12, mouseX, mouseY)) {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("Configure slots");
|
||||
net.minecraftforge.fml.client.config.GuiUtils.drawHoveringText(list, mouseX, mouseY, gui.width, gui.height, -1, gui.mc.fontRenderer);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.color(1, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderItemStack(ItemStack stack, int x, int y) {
|
||||
|
|
Loading…
Reference in a new issue