@Override protected void mouseDragged(Minecraft mc, int mouseX, int mouseY) { super.mouseDragged(mc, mouseX, mouseY); if (this.visible) { if (this.isMouseDown) { this.sliderPosition = (float) (mouseX - (this.x + 4)) / (float) (this.width - 8); if (this.sliderPosition < 0.0F) { this.sliderPosition = 0.0F; } if (this.sliderPosition > 1.0F) { this.sliderPosition = 1.0F; } this.updateDisplay(); this.notifyResponder(); } GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.drawTexturedModalRect(this.x + (int) (this.sliderPosition * (this.width - 8)), this.y, 0, 66, 4, height); this.drawTexturedModalRect(this.x + (int) (this.sliderPosition * (this.width - 8)) + 4, this.y, 196, 66, 4, height); } }