this.module = _module;
this.moduleInventory = _moduleInventory;
for(int i=0;i<pipe.getChassiSize();i++) {
this.addButton(new ItemButton(moduleInventory, i, -45, -35 + ((i % 3) * 27), 20, 25));
}
this.addButton(new BasicHUDButton("<",-45,-45,8,8) {
@Override
public boolean shouldRenderButton() {
return !isSlotSelected();
}
@Override
public void clicked() {
modulePage--;
}
@Override
public boolean buttonEnabled() {
return modulePage > 0;
}
});
this.addButton(new BasicHUDButton(">",-33,-45,8,8) {
@Override
public boolean shouldRenderButton() {
return !isSlotSelected();
}
@Override
public void clicked() {
modulePage++;
}
@Override
public boolean buttonEnabled() {
return modulePage < ((pipe.getChassiSize() - 1) / 3);
}
});
this.addButton(new BasicHUDButton("x",37,-45,8,8) {
@Override
public boolean shouldRenderButton() {
return isSlotSelected();
}