Update proper positioning of module list & hub elements

This commit is contained in:
noil 2019-11-04 15:41:44 -05:00
parent f264b7fbc3
commit ed0bd8c187
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ public final class HubComponent extends DraggableHudComponent {
final boolean inside = mouseX >= this.getX() && mouseX <= this.getX() + this.getW() && mouseY >= this.getY() && mouseY <= this.getY() + this.getH();
if (inside && button == 0) {
int offsetY = 0;
int offsetY = BORDER;
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {
if (component != this) {
final boolean insideTitlebar = mouseY <= this.getY() + BORDER + Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 1;

View File

@ -88,7 +88,7 @@ public final class ModuleListComponent extends DraggableHudComponent {
final boolean inside = mouseX >= this.getX() && mouseX <= this.getX() + this.getW() && mouseY >= this.getY() && mouseY <= this.getY() + this.getH();
if (inside && button == 0) {
int offsetY = 0;
int offsetY = BORDER;
for (Module module : Seppuku.INSTANCE.getModuleManager().getModuleList(this.type)) {
final boolean insideTitlebar = mouseY <= this.getY() + BORDER + Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 1;
final boolean insideComponent = mouseX >= (this.getX() + BORDER) && mouseX <= (this.getX() + this.getW() - BORDER - SCROLL_WIDTH) && mouseY >= (this.getY() + BORDER + Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 1 + offsetY - this.scroll) && mouseY <= (this.getY() + BORDER + (Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2) + 1 + offsetY - this.scroll);