MCPcopy Create free account
hub / github.com/Card-Forge/forge / setProps

Method setProps

forge-gui-mobile/src/forge/assets/TextRenderer.java:478–506  ·  view source on GitHub ↗
(String text, FSkinFont skinFont, float w, float h, boolean wrap0)

Source from the content-addressed store, hash-verified

476 }
477
478 private void setProps(String text, FSkinFont skinFont, float w, float h, boolean wrap0) {
479 boolean needUpdate = false;
480 if (fullText == null) {
481 fullText = text;
482 needUpdate = true;
483 } else if (!fullText.equals(text)) {
484 fullText = text;
485 needUpdate = true;
486 }
487 if (skinFont != baseFont) {
488 baseFont = skinFont;
489 needUpdate = true;
490 }
491 if (width != w) {
492 width = w;
493 needUpdate = true;
494 }
495 if (height != h) {
496 height = h;
497 needUpdate = true;
498 }
499 if (wrap != wrap0) {
500 wrap = wrap0;
501 needUpdate = true;
502 }
503 if (needUpdate) {
504 updatePieces(baseFont);
505 }
506 }
507
508 private TextBounds getCurrentBounds() {
509 float maxWidth = 0;

Callers 3

getBoundsMethod · 0.95
getWrappedBoundsMethod · 0.95
drawTextMethod · 0.95

Calls 2

updatePiecesMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected