use of mathax.client.systems.modules.Category in project Client by MatHax.
the class CrashReportMixin method onAddStackTrace.
@Inject(method = "addStackTrace", at = @At("TAIL"))
private void onAddStackTrace(StringBuilder sb, CallbackInfo info) {
if (Modules.get() != null) {
sb.append("\n\n");
sb.append("--- MatHax ---");
sb.append("\n");
sb.append("Version: ").append(Version.getStylized()).append("\n");
for (Category category : Modules.loopCategories()) {
List<Module> modules = Modules.get().getGroup(category);
boolean active = false;
for (Module module : modules) {
if (module != null && module.isActive()) {
active = true;
break;
}
}
if (active) {
sb.append("\n");
sb.append("[").append(category).append("]:").append("\n");
for (Module module : modules) {
sb.append(module.name).append("\n");
}
}
}
}
}
use of mathax.client.systems.modules.Category in project Client by MatHax.
the class ModulesScreen method createCategory.
// Category
protected WWindow createCategory(WContainer c, Category category) {
WWindow w = theme.window(category.name);
w.id = category.name;
w.padding = 0;
w.spacing = 0;
if (theme.categoryIcons())
w.beforeHeaderInit = wContainer -> wContainer.add(theme.item(category.icon.getDefaultStack())).pad(2);
c.add(w);
w.view.scrollOnlyWhenMouseOver = true;
w.view.hasScrollBar = false;
w.view.spacing = 0;
for (Module module : Modules.get().getGroup(category)) {
w.add(theme.module(module)).expandX();
}
return w;
}
Aggregations