diff --git a/src/main/java/net/silentclient/client/cosmetics/gui/CosmeticsGui.java b/src/main/java/net/silentclient/client/cosmetics/gui/CosmeticsGui.java index e36218d..db79001 100644 --- a/src/main/java/net/silentclient/client/cosmetics/gui/CosmeticsGui.java +++ b/src/main/java/net/silentclient/client/cosmetics/gui/CosmeticsGui.java @@ -305,7 +305,7 @@ public class CosmeticsGui extends SilentScreen { scrollHelper.setStep(5); scrollHelper.setElementsHeight((items != null ? items.size() : 0) * 35); scrollHelper.setMaxScroll(height - 25); - scrollHelper.setSpeed(100); + scrollHelper.setSpeed(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Scroll Speed").getValInt()); GL11.glPushMatrix(); GL11.glEnable(GL11.GL_SCISSOR_TEST); ScaledResolution r = new ScaledResolution(mc); diff --git a/src/main/java/net/silentclient/client/cosmetics/gui/OutfitsGui.java b/src/main/java/net/silentclient/client/cosmetics/gui/OutfitsGui.java index a565639..0453a2e 100644 --- a/src/main/java/net/silentclient/client/cosmetics/gui/OutfitsGui.java +++ b/src/main/java/net/silentclient/client/cosmetics/gui/OutfitsGui.java @@ -14,6 +14,7 @@ import net.silentclient.client.gui.font.SilentFontRenderer; import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.theme.Theme; import net.silentclient.client.gui.util.RenderUtil; +import net.silentclient.client.mods.settings.GeneralMod; import net.silentclient.client.utils.MenuBlurUtils; import net.silentclient.client.utils.MouseCursorHandler; import net.silentclient.client.utils.ScrollHelper; @@ -72,7 +73,7 @@ public class OutfitsGui extends SilentScreen { scrollHelper.setStep(5); scrollHelper.setElementsHeight((float) Math.ceil((Outfits.getOutfits().size() + 3) / 3) * 85); scrollHelper.setMaxScroll(height - 20); - scrollHelper.setSpeed(100); + scrollHelper.setSpeed(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Scroll Speed").getValInt()); scrollHelper.setFlag(true); float scrollY = scrollHelper.getScroll(); RenderUtil.drawRoundedRect(x, y, width, height, 4, Theme.backgroundColor().getRGB()); diff --git a/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java b/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java index 0ab8ecc..3a104fd 100644 --- a/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java +++ b/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java @@ -14,6 +14,7 @@ import net.silentclient.client.gui.font.SilentFontRenderer; import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.theme.Theme; import net.silentclient.client.gui.util.RenderUtil; +import net.silentclient.client.mods.settings.GeneralMod; import net.silentclient.client.utils.MenuBlurUtils; import net.silentclient.client.utils.MouseCursorHandler; import net.silentclient.client.utils.ScrollHelper; @@ -51,7 +52,7 @@ public class EmoteMenuGui extends SilentScreen { scrollHelper.setStep(5); scrollHelper.setElementsHeight((float) Math.ceil((Client.getInstance().getCosmetics().getMyEmotes().size() + 3) / 3) * 85); scrollHelper.setMaxScroll(height - 20); - scrollHelper.setSpeed(100); + scrollHelper.setSpeed(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Scroll Speed").getValInt()); scrollHelper.setFlag(true); float scrollY = scrollHelper.getScroll(); RenderUtil.drawRoundedRect(x, y, width, height, 4, Theme.backgroundColor().getRGB()); diff --git a/src/main/java/net/silentclient/client/gui/multiplayer/SilentMultiplayerGui.java b/src/main/java/net/silentclient/client/gui/multiplayer/SilentMultiplayerGui.java index 60801f2..34e2e93 100644 --- a/src/main/java/net/silentclient/client/gui/multiplayer/SilentMultiplayerGui.java +++ b/src/main/java/net/silentclient/client/gui/multiplayer/SilentMultiplayerGui.java @@ -20,6 +20,7 @@ import net.silentclient.client.gui.minecraft.GuiConnecting; import net.silentclient.client.gui.multiplayer.components.ServerComponent; import net.silentclient.client.gui.theme.Theme; import net.silentclient.client.mixin.ducks.ServerListExt; +import net.silentclient.client.mods.settings.GeneralMod; import net.silentclient.client.utils.MouseCursorHandler; import net.silentclient.client.utils.ScrollHelper; import org.lwjgl.opengl.GL11; @@ -142,7 +143,7 @@ public class SilentMultiplayerGui extends SilentScreen { scrollHelper.setStep(5); scrollHelper.setElementsHeight(servers.size() * 38); scrollHelper.setMaxScroll(blockHeight - 43 - 41); - scrollHelper.setSpeed(100); + scrollHelper.setSpeed(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Scroll Speed").getValInt()); float serverY = blockY + 43 + scrollHelper.getScroll(); trimContentStart(); int serverIndex = -1; diff --git a/src/main/java/net/silentclient/client/gui/resourcepacks/SilentResourcePacksGui.java b/src/main/java/net/silentclient/client/gui/resourcepacks/SilentResourcePacksGui.java index ae61f6f..ac4df4f 100644 --- a/src/main/java/net/silentclient/client/gui/resourcepacks/SilentResourcePacksGui.java +++ b/src/main/java/net/silentclient/client/gui/resourcepacks/SilentResourcePacksGui.java @@ -18,6 +18,7 @@ import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils; import net.silentclient.client.gui.theme.Theme; import net.silentclient.client.gui.util.RenderUtil; +import net.silentclient.client.mods.settings.GeneralMod; import net.silentclient.client.utils.*; import org.apache.commons.io.FilenameUtils; import org.lwjgl.Sys; @@ -125,7 +126,7 @@ public class SilentResourcePacksGui extends SilentScreen { scrollHelper.setStep(5); scrollHelper.setElementsHeight(availableResourcePacks.size() * 37 + 19); scrollHelper.setMaxScroll(blockHeight - 45); - scrollHelper.setSpeed(150); + scrollHelper.setSpeed(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Scroll Speed").getValInt()); if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) { scrollHelper.setFlag(true); @@ -207,7 +208,7 @@ public class SilentResourcePacksGui extends SilentScreen { scrollHelper2.setStep(5); scrollHelper2.setElementsHeight(selectedResourcePacks.size() * 37 + 19); scrollHelper2.setMaxScroll(blockHeight - 45); - scrollHelper2.setSpeed(150); + scrollHelper.setSpeed(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Scroll Speed").getValInt()); if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) { scrollHelper2.setFlag(true); } else { diff --git a/src/main/java/net/silentclient/client/mods/settings/GeneralMod.java b/src/main/java/net/silentclient/client/mods/settings/GeneralMod.java index d9a9a88..871f52a 100644 --- a/src/main/java/net/silentclient/client/mods/settings/GeneralMod.java +++ b/src/main/java/net/silentclient/client/mods/settings/GeneralMod.java @@ -43,6 +43,7 @@ public class GeneralMod extends Mod { this.addBooleanSetting("Menu Animations", this, true); this.addSliderSetting("Menu Animations Speed", this, 300, 100, 500, true); this.addBooleanSetting("Disable Scroll Wheel", this, false); + this.addSliderSetting("Scroll Speed", this, 150, 100, 1000, true); } @Override