|
60 | 60 | import com.cleanroommc.modularui.value.sync.IntSyncValue; |
61 | 61 | import com.cleanroommc.modularui.value.sync.PanelSyncManager; |
62 | 62 | import com.cleanroommc.modularui.widget.ParentWidget; |
| 63 | +import com.cleanroommc.modularui.widget.Widget; |
63 | 64 | import com.cleanroommc.modularui.widgets.ProgressWidget; |
64 | 65 | import com.cleanroommc.modularui.widgets.layout.Grid; |
65 | 66 | import it.unimi.dsi.fastutil.objects.ObjectArrayList; |
@@ -367,28 +368,28 @@ protected MultiblockUIFactory createUIFactory() { |
367 | 368 | .leftRel(0.5f) |
368 | 369 | .bottom(5) |
369 | 370 | .size(16 * 3 + 2) |
| 371 | + .child(new ProgressWidget() |
| 372 | + .sizeRel(1f) |
| 373 | + .value(new DoubleSyncValue(progressSupplier)) |
| 374 | + .texture(GTGuiTextures.HPCA_COMPONENT_OUTLINE, 47) |
| 375 | + .direction(ProgressWidget.Direction.LEFT) |
| 376 | + .tooltipAutoUpdate(true)) |
370 | 377 | .child(new Grid() |
371 | 378 | .sizeRel(1f) |
372 | 379 | .padding(1) |
373 | | - .minElementMargin(1) |
374 | | - .mapTo(3, 9, value -> new DynamicDrawable(() -> hpcaHandler.getComponentTexture2(value)) |
375 | | - .asWidget() |
| 380 | + .mapTo(3, 9, value -> new Widget<>() |
| 381 | + .overlay(new DynamicDrawable(() -> hpcaHandler.getComponentTexture2(value)) |
| 382 | + .asIcon().size(14).marginLeft(2).marginTop(2)) |
376 | 383 | .tooltipAutoUpdate(true) |
377 | 384 | .tooltipBuilder(tooltip -> { |
378 | | - hpcaHandler.addInfo(tooltip); |
379 | 385 | if (isStructureFormed()) { |
380 | 386 | tooltip.addLine(hpcaHandler.getComponentKey(value)); |
| 387 | + tooltip.spaceLine(2); |
381 | 388 | } |
| 389 | + hpcaHandler.addInfo(tooltip); |
382 | 390 | }) |
383 | | - .size(14))) |
384 | | - .child(new ProgressWidget() |
385 | | - .sizeRel(1f) |
386 | | - .value(new DoubleSyncValue(progressSupplier)) |
387 | | - .texture(GTGuiTextures.HPCA_COMPONENT_OUTLINE, |
388 | | - 47) |
389 | | - .direction(ProgressWidget.Direction.LEFT) |
390 | | - .tooltipAutoUpdate(true) |
391 | | - .tooltipBuilder(hpcaHandler::addInfo)))); |
| 391 | + .size(16) |
| 392 | + .padding(1))))); |
392 | 393 | } |
393 | 394 |
|
394 | 395 | @Override |
|
0 commit comments