diff --git a/src/main/java/me/rigamortis/seppuku/api/gui/hud/component/ToolTipComponent.java b/src/main/java/me/rigamortis/seppuku/api/gui/hud/component/ToolTipComponent.java index 9e74e44..8adb92f 100644 --- a/src/main/java/me/rigamortis/seppuku/api/gui/hud/component/ToolTipComponent.java +++ b/src/main/java/me/rigamortis/seppuku/api/gui/hud/component/ToolTipComponent.java @@ -29,7 +29,7 @@ public class ToolTipComponent extends HudComponent { super.render(mouseX, mouseY, partialTicks); if (this.alpha < 0xFF/*max alpha*/) { - this.alpha += 1/* arbitrary value, the speed at which it fades in essentially */; + this.alpha += 2/* arbitrary value, the speed at which it fades in essentially */; } if (this.alpha > 0x99/* another arbitrary value, the alpha hex value at which it begins to show on screen*/) { diff --git a/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/module/ModuleListComponent.java b/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/module/ModuleListComponent.java index 0d91b01..3fc6258 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/module/ModuleListComponent.java +++ b/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/module/ModuleListComponent.java @@ -226,14 +226,10 @@ public final class ModuleListComponent extends ResizableHudComponent { this.currentToolTip.render(mouseX, mouseY, partialTicks); } } else { - if (this.currentToolTip != null) { - this.currentToolTip = null; - } + this.removeTooltip(); } } else { - if (this.currentToolTip != null) { - this.currentToolTip = null; - } + this.removeTooltip(); } } //RenderUtil.end2D(); @@ -261,6 +257,7 @@ public final class ModuleListComponent extends ResizableHudComponent { switch (button) { case 0: if (mouseX >= (this.getX() + this.getW() - BORDER - SCROLL_WIDTH - 12) && mouseX <= (this.getX() + this.getW() - BORDER - SCROLL_WIDTH - 1)) { + this.removeTooltip(); this.currentSettings = new ModuleSettingsComponent(module, this); this.setOldScroll(this.getScroll()); this.setScroll(0); @@ -270,6 +267,7 @@ public final class ModuleListComponent extends ResizableHudComponent { this.setDragging(false); break; case 1: + this.removeTooltip(); this.currentSettings = new ModuleSettingsComponent(module, this); this.setOldScroll(this.getScroll()); this.setScroll(0); @@ -343,6 +341,11 @@ public final class ModuleListComponent extends ResizableHudComponent { } } + public void removeTooltip() { + if (this.currentToolTip != null) + this.currentToolTip = null; + } + public Module.ModuleType getType() { return type; } @@ -418,6 +421,7 @@ public final class ModuleListComponent extends ResizableHudComponent { ModuleListComponent moduleList = (ModuleListComponent) component; if (moduleList.getName().equals(parentModuleList.getName())) { moduleList.currentSettings = null; + moduleList.removeTooltip(); } } }