protected Icon[] makeIcons(String location, int count, boolean horizontal) { Icon[] icons = new Icon[count]; BufferedImage[] images = Images.split(createImage(location), count, horizontal); for (int i = 0; i < count; i++) { icons[i] = new IconUIResource(new ImageIcon(images[i])); } return icons; }
private synchronized void loadImage(Object imageData) { if (DEBUG.IMAGE) out("loadImage " + imageData); // test of synchronous loading: // out("***GOT IMAGE " + Images.getImage(imageData)); // TODO: refactor ResourceIcon to use the new ImageRef -- // will be much simpler. if (Images.getImage(imageData, this) == null) { // will make callback to gotImage when we have it isLoading = true; showLoadingStatus(); } else { // gotImage has already been called isLoading = false; } }
public void init(GameContainer arg0, StateBasedGame arg1) throws SlickException { Images.init(); Audio.init(); }