Skip to content

Commit

Permalink
Works
Browse files Browse the repository at this point in the history
Easier than I was expecting to implement this at least, not sure if this is actually possible to optimize
  • Loading branch information
machiecodes committed Jan 2, 2025
1 parent 42ab944 commit c721a44
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ protected WWindow createCategory(WContainer c, Category category) {
w.view.spacing = 0;

for (Module module : Modules.get().getGroup(category)) {
if (Config.get().hiddenModules.get().contains(module)) continue;
w.add(theme.module(module)).expandX();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.System;
import meteordevelopment.meteorclient.systems.Systems;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.combat.BedAura;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtElement;
Expand All @@ -26,6 +28,7 @@ public class Config extends System<Config> {
public final Settings settings = new Settings();

private final SettingGroup sgVisual = settings.createGroup("Visual");
private final SettingGroup sgModules = settings.createGroup("Modules");
private final SettingGroup sgChat = settings.createGroup("Chat");
private final SettingGroup sgMisc = settings.createGroup("Misc");

Expand Down Expand Up @@ -94,6 +97,29 @@ public class Config extends System<Config> {
.build()
);

// Modules

public final Setting<List<Module>> hiddenModules = sgModules.add(new ModuleListSetting.Builder()
.name("hidden-modules")
.description("Prevent these modules from being rendered as options in the clickgui.")
.build()
);

public final Setting<Integer> moduleSearchCount = sgModules.add(new IntSetting.Builder()
.name("module-search-count")
.description("Amount of modules and settings to be shown in the module search bar.")
.defaultValue(8)
.min(1).sliderMax(12)
.build()
);

public final Setting<Boolean> moduleAliases = sgModules.add(new BoolSetting.Builder()
.name("search-module-aliases")
.description("Whether or not module aliases will be used in the module search bar.")
.defaultValue(true)
.build()
);

// Chat

public final Setting<String> prefix = sgChat.add(new StringSetting.Builder()
Expand Down Expand Up @@ -134,21 +160,6 @@ public class Config extends System<Config> {
.build()
);

public final Setting<Integer> moduleSearchCount = sgMisc.add(new IntSetting.Builder()
.name("module-search-count")
.description("Amount of modules and settings to be shown in the module search bar.")
.defaultValue(8)
.min(1).sliderMax(12)
.build()
);

public final Setting<Boolean> moduleAliases = sgMisc.add(new BoolSetting.Builder()
.name("search-module-aliases")
.description("Whether or not module aliases will be used in the module search bar.")
.defaultValue(true)
.build()
);

public List<String> dontShowAgainPrompts = new ArrayList<>();

public Config() {
Expand Down

0 comments on commit c721a44

Please sign in to comment.