diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java b/Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java index 9dca5cc..61c65b0 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java +++ b/Client/src/main/java/com/baseband/client/gui/lib/component/IntSlider.java @@ -39,9 +39,9 @@ public class IntSlider extends Component { @Override public void draw(int x, int y) { - Gui.drawRect(x, y + 13, x + 151, y + 14, GUIManager.sliderBackground); - Gui.drawRect((int) Math.floor(x + f * 150), y + 11, (int) Math.floor(x + f * 150) + 1, y + 16, GUIManager.sliderColor); - fontRenderer.drawString(sliderText.apply(Math.round(f * mapper + adder)), x + 150 + 4, y + 10, GUIManager.sliderColor); + Gui.drawRect(x, y + 13, x + 141, y + 14, GUIManager.sliderBackground); + Gui.drawRect((int) Math.floor(x + f * 140), y + 11, (int) Math.floor(x + f * 140) + 1, y + 16, GUIManager.sliderColor); + fontRenderer.drawString(sliderText.apply(Math.round(f * mapper + adder)), x + 140 + 4, y + 10, GUIManager.sliderColor); } @Override @@ -94,7 +94,7 @@ public class IntSlider extends Component { return; } if(mouseButton == 0) { - f = Math.max(Math.min(x, 100), 0) / 100f; + f = Math.max(Math.min(x, 140), 0) / 140f; handle.getContent().set(field, Math.round(f * mapper + adder)); handle.updated(field); diff --git a/Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java b/Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java index 53dc318..9391b64 100644 --- a/Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java +++ b/Client/src/main/java/com/baseband/client/gui/lib/component/Slider.java @@ -39,9 +39,9 @@ public class Slider extends Component { @Override public void draw(int x, int y) { - Gui.drawRect(x, y + 13, x + 151, y + 14, GUIManager.sliderBackground); - Gui.drawRect((int) Math.floor(x + f * 150), y + 11, (int) Math.floor(x + f * 150) + 1, y + 16, GUIManager.sliderColor); - fontRenderer.drawString(sliderText.apply(f * mapper + adder), x + 150 + 4, y + 10, GUIManager.sliderColor); + Gui.drawRect(x, y + 13, x + 141, y + 14, GUIManager.sliderBackground); + Gui.drawRect((int) Math.floor(x + f * 140), y + 11, (int) Math.floor(x + f * 140) + 1, y + 16, GUIManager.sliderColor); + fontRenderer.drawString(sliderText.apply(f * mapper + adder), x + 140 + 4, y + 10, GUIManager.sliderColor); } @Override @@ -92,7 +92,7 @@ public class Slider extends Component { return; } if(mouseButton == 0) { - f = Math.max(Math.min(x, 100), 0) / 100f; + f = Math.max(Math.min(x, 140), 0) / 140f; handle.getContent().set(field, f * mapper + adder); handle.updated(field);