Package mdes.slick.sui

Examples of mdes.slick.sui.Label


   */
  public void loadPokes() {
    LoadingList.setDeferredLoading(true);
    for (int i = 0; i < 6; i++) {
      m_pokeIcon[i] = new ToggleButton();
      m_pokeName[i] = new Label();

      m_level[i] = new Label();
      m_hp[i] = new ProgressBar(0, 0);
      m_hp[i].setForeground(Color.green);

      final int j = i;
      m_pokeIcon[i].addActionListener(new ActionListener() {
View Full Code Here


        categoryClicked(0);
      }
    });
    getContentPane().add(m_categoryButtons[0]);
   
    m_categoryLabels[0] = new Label("Pokeballs");
    m_categoryLabels[0].setLocation(0,0);
    m_categoryLabels[0].setGlassPane(true);
    m_categoryLabels[0].setZIndex(1000);
    m_categoryLabels[0].setSize(150,10);
    m_categoryLabels[0].setFont(GameClient.getFontLarge());
    getContentPane().add(m_categoryLabels[0]);
   
    m_categoryButtons[1] = new Button(" ");
    LoadingList.setDeferredLoading(true);
    try{
      m_categoryButtons[1].setImage(new Image(FileLoader.loadFile(respath+"res/ui/shop/potion.png"),
          respath+"res/ui/shop/potion.png", false));
    }catch(Exception e){
      e.printStackTrace();
    }
    LoadingList.setDeferredLoading(false);
    m_categoryButtons[1].setSize(150, 160);
    m_categoryButtons[1].setLocation(151, 0);
    m_categoryButtons[1].setFont(GameClient.getFontLarge());
    m_categoryButtons[1].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        categoryClicked(1);
      }
    });
    getContentPane().add(m_categoryButtons[1]);
   
    m_categoryLabels[1] = new Label("Potions");
    m_categoryLabels[1].setLocation(151,0);
    m_categoryLabels[1].setGlassPane(true);
    m_categoryLabels[1].setFont(GameClient.getFontLarge());
    m_categoryLabels[1].setZIndex(1000);
    m_categoryLabels[1].setSize(150,10);
    getContentPane().add(m_categoryLabels[1]);
   
    m_categoryButtons[2] = new Button(" ");
    LoadingList.setDeferredLoading(true);
    try{
      m_categoryButtons[2].setImage(new Image(FileLoader.loadFile(respath+"res/ui/shop/status.png"),
          respath+"res/ui/shop/status.png", false));
    }catch(Exception e){
      e.printStackTrace();
    }
    LoadingList.setDeferredLoading(false);
    m_categoryButtons[2].setSize(150, 160);
    m_categoryButtons[2].setLocation(0,161);
    m_categoryButtons[2].setFont(GameClient.getFontLarge());
    m_categoryButtons[2].setEnabled(true);
    m_categoryButtons[2].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        categoryClicked(2);
      }
    });
    getContentPane().add(m_categoryButtons[2]);
   
    m_categoryLabels[2] = new Label("Status Heals");
    m_categoryLabels[2].setLocation(0,161);
    m_categoryLabels[2].setGlassPane(true);
    m_categoryLabels[2].setFont(GameClient.getFontLarge());
    m_categoryLabels[2].setZIndex(1000);
    m_categoryLabels[2].setSize(150,10);
    getContentPane().add(m_categoryLabels[2]);
   
    m_categoryButtons[3] = new Button(" ");
    LoadingList.setDeferredLoading(true);
    try{
      m_categoryButtons[3].setImage(new Image(FileLoader.loadFile(respath+"res/ui/shop/field.png"),
          respath+"res/ui/shop/field.png", false));
    }catch(Exception e){
      e.printStackTrace();
    }
    LoadingList.setDeferredLoading(false);
    m_categoryButtons[3].setSize(150, 160);
    m_categoryButtons[3].setLocation(151,161);
    m_categoryButtons[3].setFont(GameClient.getFontLarge());
    m_categoryButtons[3].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        categoryClicked(3);
      }
    });
    getContentPane().add(m_categoryButtons[3]);
   
    m_categoryLabels[3] = new Label("Field Tools");
    m_categoryLabels[3].setLocation(151,161);
    m_categoryLabels[3].setGlassPane(true);
    m_categoryLabels[3].setFont(GameClient.getFontLarge());
    m_categoryLabels[3].setZIndex(1000);
    m_categoryLabels[3].setSize(150,10);
View Full Code Here

      String respath = System.getProperty("res.path");
      if(respath==null)
        respath="";
      try{
        LoadingList.setDeferredLoading(true);
        m_itemPics[i] = new Label(new Image(FileLoader.loadFile(respath+"res/items/24/" + m_items.get(i).getId() + ".png"),
            respath+"res/items/24/" + m_items.get(i).getId() + ".png", false));
        LoadingList.setDeferredLoading(false);
        m_itemPics[i].setGlassPane(true);
        m_itemPics[i].setSize(32,32);
        if(i>0)
          m_itemPics[i].setLocation(0,(m_itemPics[i-1].getY()+51));
        else
          m_itemPics[i].setLocation(0,12);
        m_itemPics[i].setZIndex(1000);
        getContentPane().add(m_itemPics[i]);
      }catch(Exception e){
        e.printStackTrace();
      }
     
      try{
        LoadingList.setDeferredLoading(true);
        String stock = "empty";
        if(m_stock.get(m_items.get(i).getId()) >= 100 || m_items.size() == -1){
          stock = "full";
        } else if (m_stock.get(m_items.get(i).getId()) < 100 && m_stock.get(m_items.get(i).getId()) >= 60){
          stock = "half";
        } else if (m_stock.get(m_items.get(i).getId()) < 60 && m_stock.get(m_items.get(i).getId()) >= 30){
          stock = "halfempty";
        }
        m_itemStockPics[i] = new Label(new Image(FileLoader.loadFile(respath+"res/ui/shop/"+stock+".png"),
            respath+"res/ui/shop/"+stock+".png", false));
        LoadingList.setDeferredLoading(false);
        m_itemStockPics[i].setGlassPane(true);
        m_itemStockPics[i].setSize(32,32);
        if(i>0)
          m_itemStockPics[i].setLocation(260,(m_itemStockPics[i-1].getY()+51));
        else
          m_itemStockPics[i].setLocation(260,12);
        m_itemStockPics[i].setZIndex(1000);
        getContentPane().add(m_itemStockPics[i]);
      }catch(Exception e){
        e.printStackTrace();
      }
     
      m_itemLabels[i] = new Label(m_items.get(i).getName()+" - $"+m_items.get(i).getPrice());
      m_itemLabels[i].setSize(200,50);
      m_itemLabels[i].setFont(GameClient.getFontLarge());
      m_itemLabels[i].setZIndex(1200);
      m_itemLabels[i].setHorizontalAlignment(0);
      m_itemLabels[i].addMouseListener(new MouseListener() {
View Full Code Here

            final int j = i;
            m_itemButtons[i] = new Button("       x" + m_items.get(i).getQuantity());
            m_itemButtons[i].setToolTipText(m_items.get(i).getItem().getName()+"\n"+m_items.get(i).getItem().getDescription());
            LoadingList.setDeferredLoading(true);
            try {
              m_itemIcon[i] = new Label();
                m_itemIcon[i].setSize(32, 32);
                f = FileLoader.loadFile(respath+"res/items/24/" + m_items.get(i).getNumber() + ".png");
              m_itemIcon[i].setImage(new Image(f, respath+"res/items/24/" + m_items.get(i).getNumber() + ".png", false));
              m_itemIcon[i].setGlassPane(true);
              m_itemIcon[i].setToolTipText(m_items.get(i).getItem().getName()+"\n"+m_items.get(i).getItem().getDescription());
View Full Code Here

   */
  public TownMap() {
    super("World Map");
    getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
    m_mapName = new Label();
    m_playerLoc = new Label();
    m_timer = new Timer();
   
    LoadingList.setDeferredLoading(true);
    String respath = System.getProperty("res.path");
    if(respath==null)
      respath="";
    try {
      m_map = new Label(new Image(respath+"res/ui/KantoandJohto.png", false));
    } catch (SlickException e) {}
    LoadingList.setDeferredLoading(false);

    m_map.setSize(534, 264);
    m_map.setLocation(0, 0);
View Full Code Here

   * Set's the players current location
   */
  public void setPlayerLocation() {
    try {
      remove(m_playerLoc);
      m_playerLoc = new Label();
    } catch (Exception e) {}
    String currentLoc = GameClient.getInstance().getMapMatrix().getCurrentMap().getName();
    m_playerLoc.setOpaque(true);
    m_playerLoc.setBackground(new Color(255, 0, 0, 130));
    try {
View Full Code Here

    this.getTitleBar().getCloseButton().setVisible(false);
    this.setLocation(420, 220);
    this.setResizable(false);
    this.setDraggable(false);
   
    m_u = new Label(translated.get(5));
    m_u.pack();
    m_u.setLocation(4, 4);
    m_u.setFont(GameClient.getFontSmall());
    m_u.setForeground(m_white);
    this.add(m_u);
   
    m_username = new TextField();
    m_username.setSize(128, 24);
    m_username.setLocation(4, 24);
    m_username.setVisible(true);
    m_username.grabFocus();
    this.add(m_username);
   
    m_p = new Label(translated.get(6));
    m_p.pack();
    m_p.setLocation(4, 52);
    m_p.setFont(GameClient.getFontSmall());
    m_p.setForeground(m_white);
    this.add(m_p);
   
    m_password = new TextField();
    m_password.setSize(128, 24);
    m_password.setLocation(4, 72);
    m_password.setMaskCharacter('*');
    m_password.setMaskEnabled(true);
    m_password.setVisible(true);
    this.add(m_password);
   
    m_cp = new Label(translated.get(10));
    m_cp.pack();
    m_cp.setLocation(4, 100);
    m_cp.setFont(GameClient.getFontSmall());
    m_cp.setForeground(m_white);
    this.add(m_cp);
   
    m_confirmPass = new TextField();
    m_confirmPass.setSize(128, 24);
    m_confirmPass.setLocation(4, 122);
    m_confirmPass.setMaskCharacter('*');
    m_confirmPass.setMaskEnabled(true);
    m_confirmPass.setVisible(true);
    this.add(m_confirmPass);
   
    m_d = new Label(translated.get(11));
    m_d.pack();
    m_d.setLocation(4, 152);
    m_d.setFont(GameClient.getFontSmall());
    m_d.setForeground(m_white);
    this.add(m_d);
   
    m_day = new TextField();
    m_day.setSize(32, 24);
    m_day.setLocation(4, 172);
    m_day.setVisible(true);
    this.add(m_day);
   
    m_month = new TextField();
    m_month.setSize(32, 24);
    m_month.setLocation(40, 172);
    m_month.setVisible(true);
    this.add(m_month);
   
    m_year = new TextField();
    m_year.setSize(52, 24);
    m_year.setLocation(76, 172);
    m_year.setVisible(true);
    this.add(m_year);
   
    m_e = new Label(translated.get(12));
    m_e.pack();
    m_e.setLocation(4, 202);
    m_e.setFont(GameClient.getFontSmall());
    m_e.setForeground(m_white);
    this.add(m_e);
   
    m_email = new TextField();
    m_email.setSize(128, 24);
    m_email.setLocation(4, 220);
    m_email.setVisible(true);
    this.add(m_email);
   
    m_ce = new Label(translated.get(13));
    m_ce.pack();
    m_ce.setLocation(4, 248);
    m_ce.setFont(GameClient.getFontSmall());
    m_ce.setForeground(m_white);
    this.add(m_ce);
   
    m_confirmEmail = new TextField();
    m_confirmEmail.setSize(128, 24);
    m_confirmEmail.setLocation(4, 268);
    m_confirmEmail.setVisible(true);
    this.add(m_confirmEmail);
   
    m_s = new Label(translated.get(14));
    m_s.pack();
    m_s.setLocation(170, 4);
    m_s.setFont(GameClient.getFontSmall());
    m_s.setForeground(m_white);
    this.add(m_s);
   
    this.generateStarters();
   
    m_g = new Label(translated.get(15));
    m_g.pack();
    m_g.setLocation(170, 128);
    m_g.setFont(GameClient.getFontSmall());
    m_g.setForeground(m_white);
    this.add(m_g);
   
    m_male = new Button(translated.get(16));
    m_male.setSize(64, 24);
    m_male.setLocation(170, 150);
    m_male.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        m_female.setEnabled(true);
        m_gender = 0;
        m_male.setEnabled(false);
      }
    });
    this.add(m_male);
   
    m_female = new Button(translated.get(17));
    m_female.setSize(64, 24);
    m_female.setLocation(234, 150);
    m_female.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        m_female.setEnabled(false);
        m_gender = 1;
        m_male.setEnabled(true);
      }
    });
    this.add(m_female);
   
    m_reg = new Label("Starting Region:");
    m_reg.setFont(GameClient.getFontSmall());
    m_reg.setForeground(m_white);
    m_reg.pack();
    m_reg.setLocation(170, 182);
    m_reg.setVisible(true);
    this.add(m_reg);
   
    /* Generate region selection */
    m_regions = new Button[4];
    m_regions[0] = new Button("Kanto");
    m_regions[0].setSize(64, 24);
    m_regions[0].setLocation(170, 206);
    m_regions[0].setToolTipText("A town-filled region\nconnected to the\neast of Johto");
    m_regions[0].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        m_region = 0;
        m_regions[0].setEnabled(false);
        m_regions[1].setEnabled(true);
        m_regions[2].setEnabled(false);
        m_regions[3].setEnabled(false);
      }
    });
    m_regions[0].setVisible(true);
    this.add(m_regions[0]);
   
    m_regions[1] = new Button("Johto");
    m_regions[1].setSize(64, 24);
    m_regions[1].setLocation(234, 206);
    m_regions[1].setToolTipText("A city-filled\nregion connected\nto the west\nof Kanto");
    m_regions[1].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        m_region = 1;
        m_regions[0].setEnabled(true);
        m_regions[1].setEnabled(false);
        m_regions[2].setEnabled(false);
        m_regions[3].setEnabled(false);
      }
    });
    m_regions[1].setVisible(true);
    this.add(m_regions[1]);
   
    m_regions[2] = new Button("Hoenn");
    m_regions[2].setSize(64, 24);
    m_regions[2].setLocation(170, 230);
    m_regions[2].setToolTipText("An island region\nsouth-west\nof Johto");
    m_regions[2].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        m_region = 0;
        m_regions[0].setEnabled(false);
        m_regions[1].setEnabled(false);
        m_regions[2].setEnabled(false);
        m_regions[3].setEnabled(false);
      }
    });
    m_regions[2].setVisible(true);
    m_regions[2].setEnabled(false);
    this.add(m_regions[2]);
   
    m_regions[3] = new Button("Sinnoh");
    m_regions[3].setSize(64, 24);
    m_regions[3].setLocation(234, 230);
    m_regions[3].setToolTipText("A mountainous\nregion north\nof Kanto");
    m_regions[3].addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        m_region = 0;
        m_regions[0].setEnabled(false);
        m_regions[1].setEnabled(false);
        m_regions[2].setEnabled(false);
        m_regions[3].setEnabled(false);
      }
    });
    m_regions[3].setVisible(true);
    m_regions[3].setEnabled(false);
    this.add(m_regions[3]);
   
    m_tos = new Label(translated.get(18));
    m_tos.pack();
    m_tos.setLocation(172, 256);
    m_tos.setFont(GameClient.getFontSmall());
    m_tos.setForeground(m_white);
    this.add(m_tos);
View Full Code Here

   * @param player
   */
  public PlayerPopupDialog(String player){
    getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
    m_name = new Label(player);
    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

            }
            setHeight(getTitleBar().getHeight() + 25 * m_offers.size());
            m_containers.clear();
            for (int i = 0; i < m_offers.size(); i++) {
              final int j = i;
              final Label m_label = new Label(m_offerUser.get(i));
              final Button m_offerBtn = m_offers.get(m_offerUser.get(i));
              final Button m_cancel = new Button("Cancel");
              m_cancel.setHeight(25);
              m_cancel.setWidth(45);
              m_cancel.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e) {
                  declineOffer(j);
                }
              });
              m_label.setFont(GameClient.getFontSmall());
              m_label.setForeground(Color.white);
              m_label.pack();
              m_label.setY((float)10 - m_label.getTextHeight() / 2);
              m_offerBtn.setHeight(25);
              m_offerBtn.setX(getWidth() - 92);
              m_offerBtn.setWidth(45);
              m_offerBtn.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e) {
View Full Code Here

          List<String> translated = Translator.translate("_GUI");
                this.setBackground(new Color(255,255,255,200));
                int x = 70;
                int y = 5;
                for (int i = 0; i < 14; i++){
                        data[i] = new Label();
                        labels[i] = new Label();
                        data[i].setX(x + 80);
                        data[i].setY(y);
                        labels[i].setX(x);
                        labels[i].setY(y);
                        y += 20;
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.