mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
Added back hyperCube.png and added power tooltip to power monitor GUI.
This commit is contained in:
1 parent
bd68b654fd
commit
35f5e01643
2 files changed
+13
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package crazypants.enderio.machine.monitor;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Rectangle;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -14,6 +15,7 @@ import crazypants.enderio.conduit.redstone.SignalColor;
|
||||
import crazypants.enderio.gui.CheckBoxEIO;
|
||||
import crazypants.enderio.gui.ColorButton;
|
||||
import crazypants.gui.GuiScreenBase;
|
||||
import crazypants.gui.GuiToolTip;
|
||||
import crazypants.render.ColorUtil;
|
||||
import crazypants.render.RenderUtil;
|
||||
|
||||
@@ -58,7 +60,7 @@ public class GuiPowerMonitor extends GuiScreenBase {
|
||||
|
||||
private String emmitStr;
|
||||
|
||||
public GuiPowerMonitor(TilePowerMonitor te) {
|
||||
public GuiPowerMonitor(final TilePowerMonitor te) {
|
||||
super(WIDTH, HEIGHT);
|
||||
this.te = te;
|
||||
drawButtons = false;
|
||||
@@ -66,6 +68,16 @@ public class GuiPowerMonitor extends GuiScreenBase {
|
||||
titleStr = "Engine Control";
|
||||
emmitStr = " Emmit";
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(POWER_X, POWER_Y, POWER_WIDTH, POWER_HEIGHT), "") {
|
||||
|
||||
@Override
|
||||
protected void updateText() {
|
||||
text.clear();
|
||||
text.add(INT_NF.format(te.getPowerHandler().getEnergyStored()) + "/" + INT_NF.format(te.getPowerHandler().getMaxEnergyStored()) + " MJ");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
fontRenderer = Minecraft.getMinecraft().fontRenderer;
|
||||
int x = MARGIN + fontRenderer.getStringWidth(titleStr) + SPACING;
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Reference in new issue
Block a user