Skip to content

Commit

Permalink
display the content of item bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
xzxADIxzx committed Mar 4, 2025
1 parent 07d546a commit 14dcc13
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/java/schema/ui/fragments/ConfigFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,26 @@ public void drawOres(DrillBuild build) {
public void drawBridgeSequence(ItemBridgeBuild build) {
builds.clearIterated();
builds.iterateBridge(build, ItemBridgeBuild::drawSelect);

Lines.stroke(2.5f, Pal.gray);
Lines.square(build.x, build.y, 2f, 45f);
Lines.stroke(1f, Pal.place);
Lines.square(build.x, build.y, 2f, 45f);

if (build.items == null) return;
Draw.reset();

var count = build.items.sum((i, a) -> 1f) - 1f;
var start = build.x - count * 2f - 4f;
var x = new float[1];

Draw.mixcol(Pal.gray, 1f);
x[0] = start;
build.items.each((i, a) -> Draw.rect(i.fullIcon, x[0] += 4f, build.y + 8f, 6f, 6f));

Draw.reset();
x[0] = start;
build.items.each((i, a) -> Draw.rect(i.fullIcon, x[0] += 4f, build.y + 9f, 6f, 6f));
}

// endregion
Expand Down

0 comments on commit 14dcc13

Please sign in to comment.