Added TooltipRenderer to mimic Item Tooltip Rendering for hover texts and replaced some error/info messages to use the TooltipRenderer

This commit is contained in:
CrushedPixel
2015-05-31 17:13:13 +02:00
parent dec1cf398c
commit 39fe6dec4e
9 changed files with 133 additions and 47 deletions

View File

@@ -1,8 +1,11 @@
package eu.crushedpixel.replaymod.gui.elements;
import eu.crushedpixel.replaymod.ReplayMod;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import java.awt.*;
import static eu.crushedpixel.replaymod.gui.overlay.GuiReplayOverlay.TEXTURE_SIZE;
import static eu.crushedpixel.replaymod.gui.overlay.GuiReplayOverlay.replay_gui;
import static org.lwjgl.opengl.GL11.GL_BLEND;
@@ -149,7 +152,7 @@ public class GuiTimeline extends Gui {
if (mouseTime != -1) {
long sec = mouseTime / 1000;
String timestamp = String.format("%02d:%02ds", sec / 60, sec % 60);
drawCenteredString(mc.fontRendererObj, timestamp, mouseX, mouseY + 5, 0xffffffff);
ReplayMod.tooltipRenderer.drawTooltip(mouseX, mouseY, timestamp, null, Color.WHITE.getRGB());
}
}