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

Method setBackgroundTexture

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

Source from the content-addressed store, hash-verified

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