MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / draw

Method draw

Mod Utils/src/eu/the5zig/mod/gui/elements/BasicRow.java:53–67  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

51 }
52
53 @Override
54 public void draw(int x, int y) {
55 x = x + 2;
56 y = y + 2;
57 String toDraw = callback != null ? callback.call() : string;
58 List<String> split = MinecraftFactory.getVars().splitStringToWidth(toDraw, maxWidth);
59 for (int i = 0, splitStringToWidthSize = split.size(); i < splitStringToWidthSize; i++) {
60 String line = split.get(i);
61 MinecraftFactory.getVars().drawString(line, x, y);
62 if (i < splitStringToWidthSize - 1)
63 y += LINE_HEIGHT;
64 else
65 y += HEIGHT;
66 }
67 }
68}

Callers

nothing calls this directly

Calls 6

getVarsMethod · 0.95
sizeMethod · 0.80
callMethod · 0.65
splitStringToWidthMethod · 0.65
getMethod · 0.65
drawStringMethod · 0.65

Tested by

no test coverage detected