Package org.spoutcraft.api.gui

Examples of org.spoutcraft.api.gui.ScreenType


    }
    SpoutClient.getHandle().displayGuiScreen(toOpen);
  }

  public static ScreenType getType(GuiScreen gui) {
    ScreenType screen = ScreenType.UNKNOWN;
    if (gui == null) {
      screen = ScreenType.GAME_SCREEN;
    }
    if (gui instanceof CustomScreen) {
      screen = ScreenType.CUSTOM_SCREEN;
View Full Code Here


      screen = new org.spoutcraft.client.gui.mainmenu.MainMenu();
    } else if (screen == null && this.thePlayer.getHealth() <= 0.0F) {
      screen = new GuiGameOver();
    }

    ScreenType display = ScreenUtil.getType(screen);

    if (notify && thePlayer != null && theWorld != null) {
      // Screen closed
      SpoutPacket packet = null;
      Screen widget = null;
View Full Code Here

    while (Keyboard.next()) {
      // Spout Start
      if (mc.thePlayer instanceof EntityClientPlayerMP && SpoutClient.getInstance().isSpoutEnabled()) {
        EntityClientPlayerMP player = (EntityClientPlayerMP) mc.thePlayer;
        ScreenType screen = ScreenUtil.getType(this);
        int i = Keyboard.getEventKey();
        boolean keyReleased = Keyboard.getEventKeyState();
        PacketKeyPress packet = new PacketKeyPress(i, keyReleased, (MovementInputFromOptions) player.movementInput, screen);
        SpoutClient.getInstance().getPacketManager().sendSpoutPacket(packet);
      }
View Full Code Here

    return false;
  }

  public Screen getScreen() {
    if (screen == null) {
      ScreenType type = ScreenUtil.getType(this);
      if (type == ScreenType.GAME_SCREEN || type == ScreenType.CUSTOM_SCREEN) {
        return screen;
      }
      screen = new GenericOverlayScreen();
      ((OverlayScreen) screen).setScreenType(type);
View Full Code Here

    if (Spoutcraft.hasPermission("spout.plugin.sortinventory")) {
      orderByAlphabet = new GenericButton("A-Z");
      orderById = new GenericButton("Id");
      orderByAlphabet.setTooltip("Will sort the inventory contents by their name");
      orderById.setTooltip("Will sort the inventory contents by their id");
      ScreenType type = ScreenUtil.getType(this);

      if (type == ScreenType.PLAYER_INVENTORY) {
        if (!this.mc.thePlayer.getActivePotionEffects().isEmpty()) {
          orderByAlphabet.setGeometry((guiLeft+146), (guiTop+65), 27, 13);
          orderById.setGeometry((guiLeft+176), (guiTop+65), 22, 13);
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.gui.ScreenType

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.