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

Method setBackgroundTexture

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

Source from the content-addressed store, hash-verified

711 }
712
713 @Override
714 public void setBackgroundTexture(Object backgroundTexture, int imageWidth, int imageHeight) {
715 this.backgroundTexture = backgroundTexture;
716
717 if (backgroundTexture != null) {
718 double w = imageWidth;
719 double h = imageHeight;
720 int listWidth = getRight() - getLeft();
721 int listHeight = getBottom() - getTop();
722
723 while (w > listWidth && h > listHeight) {
724 w -= 1;
725 h -= h / w;
726 }
727 while (w < listWidth || h < listHeight) {
728 w += 1;
729 h += h / w;
730 }
731 this.backgroundWidth = (int) w;
732 this.backgroundHeight = (int) h;
733 }
734 }
735
736 @Override
737 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