Package mdes.slick.sui

Examples of mdes.slick.sui.Button


    m_name.setForeground(Color.white);
    m_name.pack();
    m_name.setLocation(0,0);
    getContentPane().add(m_name);

    m_battle = new Button("Battle");
    m_battle.setSize(100,25);
    m_battle.setLocation(0, m_name.getY() + m_name.getHeight() + 3);
    getContentPane().add(m_battle);
   
    m_trade = new Button("Trade");
    m_trade.setSize(100,25);
    m_trade.setLocation(0, m_battle.getY() + 25);
    getContentPane().add(m_trade);

    m_whisper = new Button("Whisper");
    m_whisper.setSize(100,25);
    m_whisper.setLocation(0, m_trade.getY() + 25);
    getContentPane().add(m_whisper);
   
    m_addFriend = new Button("Add Friend");
    m_addFriend.setSize(100,25);
    m_addFriend.setLocation(0, m_whisper.getY() + 25);
    getContentPane().add(m_addFriend);
   
    m_cancel = new Button("Cancel");
    m_cancel.setSize(100,25);
    m_cancel.setLocation(0, m_addFriend.getY() + 25);
    getContentPane().add(m_cancel);
    setBackground(new Color(0,0,0,150));
    setSize(100, 150 + m_name.getTextHeight());
View Full Code Here


    public void addRequest(final String username, String request) {
      if(request.equalsIgnoreCase("trade")) {
        //TRADE
        if (!m_offerUser.contains(username)){
          m_offerUser.add(username);
          m_offers.put(username, new Button("Trade"));
          m_update = true;
        }
        GameClient.getInstance().getUi().getChat().addSystemMessage("*" + username +
            " sent you a trade request.");
      }
      else if(request.equalsIgnoreCase("battle")) {
        if (!m_offerUser.contains(username)){
          m_offerUser.add(username);
          m_offers.put(username, new Button("Battle"));
          m_update = true;
        }
        GameClient.getInstance().getUi().getChat().addSystemMessage("*" + username +
        " would like to battle!");
      }
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) {
                  acceptOffer(j);
                }
              });
              m_containers.add(new Container());
              m_containers.get(i).setSize(getWidth(), 25);
              m_containers.get(i).setLocation(0, y);
              m_containers.get(i).add(m_label);
              m_containers.get(i).add(m_offerBtn);
              m_containers.get(i).add(m_cancel);
              m_cancel.setX(getWidth() - 47);
              getContentPane().add(m_containers.get(i));
              y += 25;
            }
          }
        }
View Full Code Here

     */
    try {
      m_languages = new Button[8];
     
     
      m_languages[0] = new Button("English");
      m_languages[0].setSize(280, 24);
      m_languages[0].setLocation(30, 42);
      m_languages[0].setVisible(true);
      m_languages[0].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("english");
        }
      });
      this.add(m_languages[0]);
     
      m_languages[1] = new Button("Espanol");
      m_languages[1].setSize(280, 24);
      m_languages[1].setLocation(30, 70);
      m_languages[1].setVisible(true);
      m_languages[1].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("spanish");
        }
      });
      this.add(m_languages[1]);
     
      m_languages[2] = new Button("Francais");
      m_languages[2].setSize(280, 24);
      m_languages[2].setLocation(30, 98);
      m_languages[2].setVisible(true);
      m_languages[2].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("french");
        }
      });
      this.add(m_languages[2]);
     
      m_languages[3] = new Button("Portugues");
      m_languages[3].setSize(280, 24);
      m_languages[3].setLocation(30, 126);
      m_languages[3].setVisible(true);
      m_languages[3].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("portuguese");
         
        }
      });
      this.add(m_languages[3]);
     
      m_languages[4] = new Button("Suomi");
      m_languages[4].setSize(280, 24);
      m_languages[4].setLocation(30, 154);
      m_languages[4].setVisible(true);
      m_languages[4].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("finnish");
         
        }
      });
      this.add(m_languages[4]);
     
      m_languages[5] = new Button("Italiano");
      m_languages[5].setSize(280, 24);
      m_languages[5].setLocation(30, 182);
      m_languages[5].setVisible(true);
      m_languages[5].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("italian");
         
        }
      });
      this.add(m_languages[5]);
     
      m_languages[6] = new Button("Nederlands");
      m_languages[6].setSize(280, 24);
      m_languages[6].setLocation(30, 210);
      m_languages[6].setVisible(true);
      m_languages[6].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          GameClient.setLanguage("dutch");
         
        }
      });
      this.add(m_languages[6]);
     
      m_languages[7] = new Button("Deutsch");
      m_languages[7].setSize(280, 24);
      m_languages[7].setLocation(30, 238);
      m_languages[7].setVisible(true);
      m_languages[7].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
View Full Code Here

TOP

Related Classes of mdes.slick.sui.Button

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.