/** Creates an Icon for a non-BlockFamily class */ public Icon() { _element = new UIGraphicsElement("items"); _blockFamily = null; _element.setSize(new Vector2f(32, 32)); _element.getTextureSize().set(new Vector2f(0.0624f, 0.0624f)); _element.setVisible(true); _element.setPosition(new Vector2f(-10f, -16f)); setAtlasPosition(0, 0); }
public UIInventory() { setSize(new Vector2f(176.0f * 2.5f, 167.0f * 2.5f)); _background = new UIGraphicsElement("inventory"); _background.setSize(getSize()); _background.getTextureSize().set(new Vector2f(176.0f / 256.0f, 167.0f / 256.0f)); _background.setVisible(true); addDisplayElement(_background); _cells = new UIToolbarCell[27]; for (int i = 9; i < _cells.length; i++) { UIInventoryCell cell = new UIInventoryCell(i); cell.setVisible(true); addDisplayElement(cell); } for (int i = 0; i < 9; i++) { UIInventoryCell cell = new UIInventoryCell(i); cell.setVisible(true); addDisplayElement(cell); } }