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

Method setBackgroundTexture

Minecraft-Utils/1.10/src/GuiList.java:699–720  ·  view source on GitHub ↗
(Object backgroundTexture, int imageWidth, int imageHeight)

Source from the content-addressed store, hash-verified

697 }
698
699 @Override
700 public void setBackgroundTexture(Object backgroundTexture, int imageWidth, int imageHeight) {
701 this.backgroundTexture = backgroundTexture;
702
703 if (backgroundTexture != null) {
704 double w = imageWidth;
705 double h = imageHeight;
706 int listWidth = getRight() - getLeft();
707 int listHeight = getBottom() - getTop();
708
709 while (w > listWidth && h > listHeight) {
710 w -= 1;
711 h -= h / w;
712 }
713 while (w < listWidth || h < listHeight) {
714 w += 1;
715 h += h / w;
716 }
717 this.backgroundWidth = (int) w;
718 this.backgroundHeight = (int) h;
719 }
720 }
721
722 @Override
723 public List<E> getRows() {

Callers

nothing calls this directly

Calls 4

getRightMethod · 0.95
getLeftMethod · 0.95
getBottomMethod · 0.95
getTopMethod · 0.95

Tested by

no test coverage detected