public void draw(GOut g) { Coord c = new Coord(xoff, 0); for (Spec s : inputs) { GOut sg = g.reclip(c, Inventory.invsq.sz()); sg.image(Inventory.invsq, Coord.z); s.draw(sg); c = c.add(Inventory.sqsz.x, 0); } if (qmod != null) { g.image(qmodl.tex(), new Coord(0, qmy + 4)); c = new Coord(xoff, qmy); int mx = -1; int pw = 0; int vl = 1; for (Indir<Resource> qm : qmod) { try { Tex t = qm.get().layer(Resource.imgc).tex(); g.image(t, c); c = c.add(t.sz().x + 1, 0); if (c.x > mx) mx = c.x; try { Glob.CAttr attr = ui.gui.chrwdg.findattr(qm.get().basename()); if (attr != null) { pw++; vl *= attr.comp; Tex txt = attr.comptex(); g.image(txt, c); c = c.add(txt.sz().x + 8, 0); } } catch (Exception ignored) { } } catch (Loading l) { } } if (pw > 0) { g.image( Text.renderstroked( String.format("Cap: %.0f", Math.floor(Math.pow(vl, 1.0f / pw))), Color.WHITE, Color.BLACK, new Text.Foundry(Text.fraktur, 14).aa(true)) .tex(), new Coord(mx + 30, qmy)); } } c = new Coord(xoff, outy); for (Spec s : outputs) { GOut sg = g.reclip(c, Inventory.invsq.sz()); sg.image(Inventory.invsq, Coord.z); s.draw(sg); c = c.add(Inventory.sqsz.x, 0); } super.draw(g); }