update widgets
This commit is contained in:
parent
d5a0c8acd2
commit
010fd38e92
@ -30,9 +30,9 @@ public class BatteryBankMenu extends MatteryMenu {
|
||||
this.tile = tile;
|
||||
|
||||
if (tile == null || tile.getCapability(MatteryCapability.ENERGY).resolve().isEmpty()) {
|
||||
battery_widget = new BatteryLevelWidget(this, 13, 14);
|
||||
battery_widget = new BatteryLevelWidget(this, 13, 24);
|
||||
} else {
|
||||
battery_widget = new BatteryLevelWidget(this, 13, 14, tile.getCapability(MatteryCapability.ENERGY).resolve().get());
|
||||
battery_widget = new BatteryLevelWidget(this, 13, 24, tile.getCapability(MatteryCapability.ENERGY).resolve().get());
|
||||
}
|
||||
|
||||
for (int row = 0; row < 3; row++)
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ProgressGaugeWidget<T extends MatteryMenu> extends GaugeWidget<T> {
|
||||
protected Supplier<Float> progress_supplier;
|
||||
protected final Supplier<Float> progress_supplier;
|
||||
|
||||
protected final ContainerData progress_container = new ContainerData() {
|
||||
private int value;
|
||||
@ -33,15 +33,15 @@ public class ProgressGaugeWidget<T extends MatteryMenu> extends GaugeWidget<T> {
|
||||
}
|
||||
};
|
||||
|
||||
public ProgressGaugeWidget(T menu, int x, int y) {
|
||||
public ProgressGaugeWidget(T menu, int x, int y, Supplier<Float> progress) {
|
||||
super(menu, x, y);
|
||||
fill_order = GaugeDirection.LEFT_TO_RIGHT;
|
||||
addDataSlots(progress_container);
|
||||
progress_supplier = progress;
|
||||
}
|
||||
|
||||
public ProgressGaugeWidget(T menu, int x, int y, Supplier<Float> progress) {
|
||||
this(menu, x, y);
|
||||
progress_supplier = progress;
|
||||
public ProgressGaugeWidget(T menu, int x, int y) {
|
||||
this(menu, x, y, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user