use of gregtech.api.gui.resources.URLTexture in project GregTech by GregTechCEu.
the class ImageWidget method initFixed.
@Override
protected Widget initFixed() {
width = Math.max(0, width);
height = Math.max(0, height);
this.setSize(new Size(width, height));
switch(form) {
case "url":
image = new URLTexture(source);
break;
case "item":
image = new ItemStackTexture(Item.getByNameOrId(source));
break;
case "resource":
image = new TextureArea(new ResourceLocation(source), 0.0, 0.0, 1.0, 1.0);
break;
}
return this;
}
Aggregations