Search in sources :

Example 1 with ImageIcon

use of mcjty.lib.gui.icons.ImageIcon in project RFToolsControl by McJty.

the class GuiProgrammer method initIcons.

private void initIcons() {
    if (ICONS.isEmpty()) {
        for (Map.Entry<String, Opcode> entry : Opcodes.OPCODES.entrySet()) {
            String id = entry.getKey();
            Opcode opcode = entry.getValue();
            ResourceLocation iconResource = icons;
            if (opcode.getIconResource() != null) {
                iconResource = new ResourceLocation(opcode.getIconResource());
            }
            ICONS.put(id, new ImageIcon(id).setDimensions(ICONSIZE, ICONSIZE).setImage(iconResource, opcode.getIconU() * ICONSIZE, opcode.getIconV() * ICONSIZE));
        }
    }
}
Also used : ImageIcon(mcjty.lib.gui.icons.ImageIcon) ResourceLocation(net.minecraft.util.ResourceLocation) Opcode(mcjty.rftoolscontrol.api.code.Opcode)

Aggregations

ImageIcon (mcjty.lib.gui.icons.ImageIcon)1 Opcode (mcjty.rftoolscontrol.api.code.Opcode)1 ResourceLocation (net.minecraft.util.ResourceLocation)1