Package org.getspout.spoutapi.gui

Examples of org.getspout.spoutapi.gui.Screen


    return versionString;
  }

  public void onTick() {
    mainScreen.onTick();
    Screen currentScreen = getCurrentScreen();
    if (currentScreen != null && currentScreen instanceof OverlayScreen) {
      currentScreen.onTick();
    }
    screenOpenThisTick = false;

    // Because the player teleport event doesn't always fire :(
    Location current = getLocation();
View Full Code Here


  public void run(int playerId) {
    SpoutPlayer p = SpoutManager.getPlayerFromId(playerId);
    InGameHUD mainScreen = p.getMainScreen();
    PopupScreen popup = mainScreen.getActivePopup();
    Screen current = p.getCurrentScreen();

    Screen in = null;
    if (mainScreen != null && screen.equals(mainScreen.getId())) {
      in = mainScreen;
    }
    if (popup != null && screen.equals(popup.getId())) {
      in = popup;
    }
    if (current != null && screen.equals(current.getId())) {
      in = current;
    }
    if (in == null) {
      return;
    }
    if (!in.containsWidget(slot)) {
      return;
    }

    // Slot handling code goes here.
    Slot slot = (Slot) in.getWidget(this.slot);
    try {
      ItemStack stackOnCursor = p.getItemOnCursor();
      if (stackOnCursor == null) {
        stackOnCursor = new ItemStack(0);
      }
View Full Code Here

  @Override
  public void run(int playerId) {
    SpoutPlayer player = SpoutManager.getPlayerFromId(playerId);
    if (player != null) {
      Screen screen = null;
      if (player.getMainScreen().getId().equals(this.screen)) {
        screen = player.getMainScreen();
      }
      if (player.getMainScreen().getActivePopup() != null && player.getMainScreen().getActivePopup().getId().equals(this.screen)) {
        screen = player.getMainScreen().getActivePopup();
      }
      if (player.getCurrentScreen() != null && player.getCurrentScreen().getId().equals(this.screen)) {
        screen = player.getCurrentScreen();
      }
      if (screen != null) {
        Widget control = screen.getWidget(widget);
        if (control != null) {
          if (control instanceof Button) {
            if (control instanceof CheckBox) {
              ((CheckBox) control).setChecked(!((CheckBox) control).isChecked());
            }
View Full Code Here

TOP

Related Classes of org.getspout.spoutapi.gui.Screen

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.