forked from RepoMirrors/seppuku
HubComponent now checks for dragging only inside the title-bar area
This commit is contained in:
parent
558636579c
commit
d2f297184c
|
@ -53,6 +53,12 @@ public final class HubComponent extends DraggableHudComponent {
|
||||||
// Scrolling
|
// Scrolling
|
||||||
this.handleScrolling(mouseX, mouseY);
|
this.handleScrolling(mouseX, mouseY);
|
||||||
|
|
||||||
|
// No dragging inside box
|
||||||
|
final boolean insideTitlebar = mouseY <= this.getY() + BORDER + Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 1;
|
||||||
|
if (!insideTitlebar) {
|
||||||
|
this.setDragging(false);
|
||||||
|
}
|
||||||
|
|
||||||
// Background & title
|
// Background & title
|
||||||
RenderUtil.drawRect(this.getX(), this.getY(), this.getX() + this.getW(), this.getY() + this.getH(), 0xFF202020);
|
RenderUtil.drawRect(this.getX(), this.getY(), this.getX() + this.getW(), this.getY() + this.getH(), 0xFF202020);
|
||||||
mc.fontRenderer.drawStringWithShadow(this.getName(), this.getX() + 2, this.getY() + 2, 0xFFFFFFFF);
|
mc.fontRenderer.drawStringWithShadow(this.getName(), this.getX() + 2, this.getY() + 2, 0xFFFFFFFF);
|
||||||
|
|
Loading…
Reference in New Issue