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

Method getMaxWidth

The 5zig Mod/src/eu/the5zig/mod/modules/Module.java:213–233  ·  view source on GitHub ↗
(boolean dummy)

Source from the content-addressed store, hash-verified

211 }
212
213 public int getMaxWidth(boolean dummy) {
214 if (calculatedWidth >= 0) {
215 return calculatedWidth;
216 }
217 int max = 0;
218 for (ActiveModuleItem item : items) {
219 if (item.getHandle().shouldRender(dummy)) {
220 int width = item.getHandle().getWidth(dummy);
221 if (width > max) {
222 max = width;
223 }
224 }
225 }
226 if (isShowLabel()) {
227 int width = The5zigMod.getVars().getStringWidth(getDisplayName());
228 if (width > max) {
229 max = width;
230 }
231 }
232 return (int) (max * scale);
233 }
234
235 public int getTotalHeight(boolean dummy) {
236 if (calculatedHeight >= 0) {

Callers 4

renderMethod · 0.95
renderModulesMethod · 0.45
actionPerformedMethod · 0.45
drawScreenMethod · 0.45

Calls 7

isShowLabelMethod · 0.95
getVarsMethod · 0.95
getDisplayNameMethod · 0.95
getWidthMethod · 0.65
getStringWidthMethod · 0.65
shouldRenderMethod · 0.45
getHandleMethod · 0.45

Tested by

no test coverage detected