use of me.earth.earthhack.api.module.util.Category in project 3arthh4ck by 3arthqu4ke.
the class Click method init.
public void init() {
if (!attached) {
CLICK_GUI.get().descriptionWidth.addObserver(e -> descriptionFrame.setWidth(e.getValue()));
attached = true;
}
getFrames().clear();
int x = CLICK_GUI.get().catEars.getValue() ? 14 : 2;
int y = CLICK_GUI.get().catEars.getValue() ? 14 : 2;
for (Category moduleCategory : Category.values()) {
getFrames().add(new CategoryFrame(moduleCategory, x, y, 110, 16));
if (x + 220 >= new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth()) {
x = CLICK_GUI.get().catEars.getValue() ? 14 : 2;
y += CLICK_GUI.get().catEars.getValue() ? 32 : 20;
} else
x += (CLICK_GUI.get().catEars.getValue() ? 132 : 112);
}
descriptionFrame = new DescriptionFrame(x, y, CLICK_GUI.get().descriptionWidth.getValue(), 16);
getFrames().add(descriptionFrame);
getFrames().forEach(Frame::init);
oldVal = CLICK_GUI.get().catEars.getValue();
}
Aggregations