@@ -281,71 +281,6 @@ public boolean swapIO() {
281281 return true ;
282282 }
283283
284- //////////////////////////////////////
285- // ********** GUI ***********//
286- //////////////////////////////////////
287-
288- /*
289- * @Override
290- * public void attachConfigurators(ConfiguratorPanel configuratorPanel) {
291- * super.attachConfigurators(configuratorPanel);
292- * if (isCircuitSlotEnabled() && this.io == IO.IN) {
293- * configuratorPanel.attachConfigurators(new CircuitFancyConfigurator(circuitInventory.storage));
294- * }
295- * }
296- *
297- * @Override
298- * public Widget createUIWidget() {
299- * if (slots == 1) {
300- * return createSingleSlotGUI();
301- * } else {
302- * return createMultiSlotGUI();
303- * }
304- * }
305- *
306- * protected Widget createSingleSlotGUI() {
307- * var group = new WidgetGroup(0, 0, 89, 63);
308- * group.addWidget(new ImageWidget(4, 4, 81, 55, GuiTextures.DISPLAY));
309- * TankWidget tankWidget;
310- *
311- * // Add input/output-specific widgets
312- * if (this.io == IO.OUT) {
313- * // if this is an output hatch, assign tankWidget to the phantom widget displaying the locked fluid...
314- * group.addWidget(tankWidget = new PhantomFluidWidget(this.tank.getLockedFluid(), 0, 67, 40, 18, 18,
315- * () -> this.tank.getLockedFluid().getFluid(), f -> {
316- * if (!this.tank.getFluidInTank(0).isEmpty()) {
317- * return;
318- * }
319- * if (f == null || f.isEmpty()) {
320- * this.tank.setLocked(false);
321- * } else {
322- * FluidStack newFluid = f.copy();
323- * newFluid.setAmount(1);
324- * this.tank.setLocked(true, newFluid);
325- * }
326- * }).setShowAmount(false).setDrawHoverTips(true).setBackground(GuiTextures.FLUID_SLOT));
327- *
328- * group.addWidget(new ToggleButtonWidget(7, 40, 18, 18,
329- * GuiTextures.BUTTON_LOCK, this.tank::isLocked, this.tank::setLocked)
330- * .setTooltipText("gtceu.gui.fluid_lock.tooltip")
331- * .setShouldUseBaseBackground())
332- * // ...and add the actual tank widget separately.
333- * .addWidget(new TankWidget(tank.getStorages()[0], 67, 22, 18, 18, true, io.support(IO.IN))
334- * .setShowAmount(true).setDrawHoverTips(true).setBackground(GuiTextures.FLUID_SLOT));
335- * } else {
336- * group.addWidget(tankWidget = new TankWidget(tank.getStorages()[0], 67, 22, 18, 18, true, io.support(IO.IN))
337- * .setShowAmount(true).setDrawHoverTips(true).setBackground(GuiTextures.FLUID_SLOT));
338- * }
339- *
340- * group.addWidget(new LabelWidget(8, 8, "gtceu.gui.fluid_amount"))
341- * .addWidget(new LabelWidget(8, 18, () -> getFluidAmountText(tankWidget)))
342- * .addWidget(new LabelWidget(8, 28, () -> getFluidNameText(tankWidget).getString()));
343- *
344- * group.setBackground(GuiTextures.BACKGROUND_INVERSE);
345- * return group;
346- * }
347- */
348-
349284 private Component getFluidNameText () {
350285 Component translation ;
351286 if (!this .tank .getFluidInTank (0 ).isEmpty ()) {
@@ -377,34 +312,6 @@ public String getFormattedFluidAmount(FluidStack fluidStack) {
377312 return String .format ("%,d" , fluidStack .isEmpty () ? 0 : fluidStack .getAmount ());
378313 }
379314
380- /*
381- * protected Widget createMultiSlotGUI() {
382- * int rowSize = (int) Math.sqrt(slots);
383- * int colSize = rowSize;
384- * if (slots == 8) {
385- * rowSize = 4;
386- * colSize = 2;
387- * }
388- *
389- * var group = new WidgetGroup(0, 0, 18 * rowSize + 16, 18 * colSize + 16);
390- * var container = new WidgetGroup(4, 4, 18 * rowSize + 8, 18 * colSize + 8);
391- *
392- * int index = 0;
393- * for (int y = 0; y < colSize; y++) {
394- * for (int x = 0; x < rowSize; x++) {
395- * container.addWidget(
396- * new TankWidget(tank.getStorages()[index++], 4 + x * 18, 4 + y * 18, true, io.support(IO.IN))
397- * .setBackground(GuiTextures.FLUID_SLOT));
398- * }
399- * }
400- *
401- * container.setBackground(GuiTextures.BACKGROUND_INVERSE);
402- * group.addWidget(container);
403- *
404- * return group;
405- * }
406- */
407-
408315 @ Override
409316 public ModularPanel buildUI (PosGuiData data , PanelSyncManager syncManager , UISettings settings ) {
410317 return new ModularPanel (getDefinition ().getName ())
0 commit comments