Package mdes.slick.sui

Examples of mdes.slick.sui.Label


      if (m_shownFriends[i] != null){
        getContentPane().remove(m_shownFriends[i]);
        m_shownFriends[i] = null;
      }
      try{
        m_shownFriends[i] = new Label(m_friends.get(i + m_index));
      } catch (Exception e) {
        m_shownFriends[i] = new Label();
      }
      m_shownFriends[i].pack();
      m_shownFriends[i].setFont(GameClient.getFontSmall());
      if (m_online.contains(m_shownFriends[i]))
        m_shownFriends[i].setForeground(Color.white);
View Full Code Here


   * @param friend
   */
  public PopUp(String friend, boolean online){
    getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
    m_name = new Label(friend);
    m_name.setFont(GameClient.getFontSmall());
    m_name.setForeground(Color.white);
    m_name.pack();
    m_name.setLocation(0,0);
    getContentPane().add(m_name);
View Full Code Here

        LoadingList.setDeferredLoading(false);
      } catch (Exception e) {
        e.printStackTrace();
      }

      Label bg = new Label(this.bg);
      bg.setSize(400, 100);
      bg.setLocation(0, -11);
      speechDisplay = new TextArea();
     
      speechDisplay.setFocusable(false);
      speechDisplay.setSize(384, 100);
      speechDisplay.setLocation(16, 5);
View Full Code Here

  private void initGUI() {
    getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
    setTitle("Player Information");
    // Player Image
    m_playerImage = new Label(Player.getSpriteFactory().getSprite(
        Direction.Down, false, false,
        GameClient.getInstance().getOurPlayer().getSprite()));
    m_playerImage.setSize(52, 52);
    m_playerImage.setLocation(2, 2);
    getContentPane().add(m_playerImage);

    // Trainer data labels
    m_trainerEXP = new Label("Trainer Lv:          "
        + GameClient.getInstance().getOurPlayer().getTrainerLevel());
    m_breedingEXP = new Label("Breeding Lv:       "
        + GameClient.getInstance().getOurPlayer().getBreedingLevel());
    m_fishingEXP = new Label("Fishing Lv:          "
        + GameClient.getInstance().getOurPlayer().getFishingLevel());
    m_coordinatingEXP = new Label("Corrdinating Lv:  "
        + GameClient.getInstance().getOurPlayer()
            .getCoordinatingLevel());

    m_trainerEXP.pack();
    m_breedingEXP.pack();
    m_fishingEXP.pack();
    m_coordinatingEXP.pack();

    m_trainerEXP.setForeground(Color.white);
    m_breedingEXP.setForeground(Color.white);
    m_fishingEXP.setForeground(Color.white);
    m_coordinatingEXP.setForeground(Color.white);
   
    m_trainerEXP.setLocation(m_playerImage.getWidth() + 2, 2);
    m_breedingEXP.setLocation(m_playerImage.getWidth() + 2, 2
        + m_trainerEXP.getY() + m_trainerEXP.getHeight());
    m_fishingEXP.setLocation(m_playerImage.getWidth() + 2, 2
        + m_breedingEXP.getY() + m_breedingEXP.getHeight());
    m_coordinatingEXP.setLocation(m_playerImage.getWidth() + 2, 2
        + m_fishingEXP.getY() + m_fishingEXP.getHeight());

    getContentPane().add(m_trainerEXP);
    getContentPane().add(m_breedingEXP);
    getContentPane().add(m_fishingEXP);
    getContentPane().add(m_coordinatingEXP);

    // Start the badge labels
    m_kantoLbl = new Label("Kanto:");
    m_johtoLbl = new Label("Johto:");
    if (ALL_REGIONS)
      m_hoennLbl = new Label("Hoenn:");
    if (ALL_REGIONS)
      m_sinnohLbl = new Label("Sinnoh:");
    if (ALL_REGIONS)
      m_orangeLbl = new Label("Orange Islands:");
    if (ALL_REGIONS)
      m_extrasLbl = new Label("Others:");

    // Pack the badge labels
    m_kantoLbl.pack();
    m_johtoLbl.pack();
   
View Full Code Here

    String m_path = respath+"res/badges/";
    // Kanto Badges
    for (int i = 0; i < 8; i++) {
      try {
        // KANTO
        m_kanto[i] = new Label(new Image(m_path
            + "kanto" + (i + 1) + ".png", false));
        m_kanto[i].setSize(18, 18);
        m_kanto[i].setX(maxLblWidth + (20 * i));
        m_kanto[i].setY(m_coordinatingEXP.getY()
            + m_coordinatingEXP.getHeight() + 2);
        getContentPane().add(m_kanto[i]);

        // JOHTO
        m_johto[i] = new Label(new Image(m_path
            + "johto" + (i + 1) + ".png", false));
        m_johto[i].setSize(18, 18);
        m_johto[i].setX(2 + maxLblWidth + (20 * i));
        m_johto[i].setY(2 + m_kanto[i].getY() + m_kanto[i].getHeight());
        getContentPane().add(m_johto[i]);

        // HOENN
        if (ALL_REGIONS) {
          m_hoenn[i] = new Label(new Image(m_path + "hoenn" + (i + 1) + ".png", false));
          m_hoenn[i].setSize(18, 18);
          m_hoenn[i].setX(2 + maxLblWidth + (20 * i));
          m_hoenn[i].setY(2 + m_johto[i].getY()
              + m_johto[i].getHeight());
          getContentPane().add(m_hoenn[i]);
        }
        // SINNOH
        if (ALL_REGIONS) {
          m_sinnoh[i] = new Label(new Image(m_path + "sinnoh" + (i + 1) + ".png", false));
          m_sinnoh[i].setSize(18, 18);
          m_sinnoh[i].setX(2 + maxLblWidth + (20 * i));
          m_sinnoh[i].setY(2 + m_hoenn[i].getY()
              + m_hoenn[i].getHeight());
          getContentPane().add(m_sinnoh[i]);
        }
        // ORANGE ISLANDS
        if (ALL_REGIONS) {
          if (i < 4) {
            m_orange[i] = new Label(new Image(m_path + "orange" + (i + 1) + ".png", false));
            m_orange[i].setSize(18, 18);
            m_orange[i].setX(2 + maxLblWidth + (20 * i));
            m_orange[i].setY(2 + m_sinnoh[i].getY()
                + m_sinnoh[i].getHeight());
            getContentPane().add(m_orange[i]);
          }
        }
        // Extra badges ???
        if (ALL_REGIONS) {
          if (i < 6) {
            m_extras[i] = new Label(new Image(m_path + "extra" + (i + 1) + ".png", false));
            m_extras[i].setSize(18, 18);
            m_extras[i].setX(2 + maxLblWidth + (20 * i));
            m_extras[i].setY(2 + m_orange[i].getY()
                + m_orange[i].getHeight());
            getContentPane().add(m_extras[i]);
View Full Code Here

    m_password.setVisible(true);
    m_password.setMaskCharacter('*');
    m_password.setMaskEnabled(true);
    this.add(m_password);
   
    m_userLabel = new Label(translated.get(5));
    m_userLabel.pack();
    m_userLabel.setLocation(m_username.getX() - m_userLabel.getWidth() - 24, 12);
    m_userLabel.setVisible(true);
    m_userLabel.setFont(GameClient.getFontSmall());
    m_userLabel.setForeground(m_white);
    this.add(m_userLabel);
   
    m_passLabel = new Label(translated.get(6));
    m_passLabel.pack();
    m_passLabel.setLocation(m_userLabel.getX(), 40);
    m_passLabel.setVisible(true);
    m_passLabel.setFont(GameClient.getFontSmall());
    m_passLabel.setForeground(m_white);
View Full Code Here

      };
    });
    getContentPane().add(m_cancelBtn);
   
    //Our money trade info
    m_ourCashLabel = new Label("$");
    m_ourCashLabel.pack();
    m_ourCashLabel.setLocation(10, 130);
    getContentPane().add(m_ourCashLabel);
    m_ourMoneyOffer = new TextField();
    m_ourMoneyOffer.setSize(60, 20);
    m_ourMoneyOffer.setLocation(20, 128);
    getContentPane().add(m_ourMoneyOffer);
    //Their money trade info
    m_theirMoneyOffer = new Label("$0");
    m_theirMoneyOffer.pack();
    m_theirMoneyOffer.setLocation(188, 130);
    getContentPane().add(m_theirMoneyOffer);
   
    //Window Settings
View Full Code Here

      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    // Bag Image
    Label bagicon = new Label("");
    bagicon.setSize(40, 40);

    LoadingList.setDeferredLoading(true);
    try {
      bagicon.setImage(new Image(respath+"res/ui/bag/front.png", false));
    } catch (SlickException e1) {
    }
    LoadingList.setDeferredLoading(false);

    bagicon.setLocation(18, 0);
    bagicon.setFont(GameClient.getFontLarge());
    getContentPane().add(bagicon);

    // Scrolling Button LEFT
    m_leftButton = new Button("<");
    m_leftButton.setSize(20, 40);
    m_leftButton.setLocation(15, 95);
    m_leftButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        destroyPopup();
        int i = m_scrollIndex.get(m_curCategory) - 1;
        m_scrollIndex.remove(m_curCategory);
        m_scrollIndex.put(m_curCategory, i);
        m_update = true;
      }
    });
    getContentPane().add(m_leftButton);

    // Item Buttons and Stock Labels
    for (int i = 0; i < 4; i++) {
      final int j = i;
      // Starts the item buttons
      Button item = new Button();
      item.setSize(60, 60);
      item.setLocation(50 + (80 * i), 85);
      item.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          destroyPopup();
          useItem(j);
        }
      });
      m_itemBtns.add(item);
      getContentPane().add(item);

      // Starts the item labels
      Label stock = new Label();
      stock.setSize(60, 40);
      stock.setLocation(50 + (80 * i), 135);
      stock.setHorizontalAlignment(Label.CENTER_ALIGNMENT);
      stock.setFont(GameClient.getFontLarge());
      stock.setForeground(Color.white);
      m_stockLabels.add(stock);
      getContentPane().add(stock);
    }

    // Scrolling Button Right
View Full Code Here

    final boolean m_isBattle = isBattle;
    getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
   
    // Item name label
    m_name = new Label(item.split("\n")[0]);
    m_name.setFont(GameClient.getFontSmall());
    m_name.setForeground(Color.white);
    m_name.pack();
    m_name.setLocation(0,0);
    getContentPane().add(m_name);
View Full Code Here

    final boolean m_isBattle = isBattle;

    int y = 0;
    for (int i = 0; i < GameClient.getInstance().getOurPlayer().getPokemon().length; i++) {
      try{
        final Label tempLabel = new Label(GameClient.getInstance().getOurPlayer().getPokemon()[i].getName());
        final int j = i;
        tempLabel.setSize(100, 15);
        tempLabel.setFont(GameClient.getFontSmall());
        tempLabel.setForeground(Color.white);
        tempLabel.setLocation(0, y);
        tempLabel.addMouseListener(new MouseAdapter() {
          @Override
          public void mouseReleased(MouseEvent e) {
            super.mouseReleased(e);
            processItemUse(m_use, m_item, j, m_isBattle);
          }
          @Override
          public void mouseEntered(MouseEvent e) {
            super.mouseEntered(e);
            tempLabel.setForeground(new Color(255, 215, 0));
          }
          @Override
          public void mouseExited(MouseEvent e) {
            super.mouseExited(e);
            tempLabel.setForeground(new Color(255, 255, 255));
          }
        });
        y += 18;
        getContentPane().add(tempLabel);
      } catch (Exception e) {}
View Full Code Here

TOP

Related Classes of mdes.slick.sui.Label

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.