Package org.spout.vanilla.inventory.window.gui

Examples of org.spout.vanilla.inventory.window.gui.RenderSlot


    GridIterator iter = grid.iterator();
    while (iter.hasNext()) {
      int i = iter.next(), x = iter.getX(), y = iter.getY(), size = grid.getSize();
      slots[i] = (offset + size) - (length * y) - (length - x);
      if (VanillaPlugin.getInstance().getEngine() instanceof Client) {
        RenderSlot slot = widgets[i].get(RenderSlot.class);
        slot.setSlot(new Slot(inventory, i));
        slot.setPosition(pos.add(x * SLOT_WIDTH, y * SLOT_HEIGHT));
      }
    }
  }
 
View Full Code Here


    this.inventory = inventory;
    this.slots = slots;
    this.offset = offset;
    widgets = new Widget[positions.length];
    for (int i = 0; i < widgets.length; i++) {
      final RenderSlot slot;
      if (VanillaPlugin.getInstance().getEngine() instanceof Client) {
        Widget widget = widgets[i] = ((Client) VanillaPlugin.getInstance().getEngine()).getScreenStack().createWidget();
        slot = widget.add(RenderSlot.class);
        slot.setPosition(positions[i]);
      } else {
        slot = new RenderSlot();
      }
      slot.setSlot(new Slot(inventory, i));
    }
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.inventory.window.gui.RenderSlot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.