Package org.newdawn.slick

Examples of org.newdawn.slick.Color


    } else {
      setSize(160 + 2 + maxLblWidth, m_johto[0].getY()
          + m_johto[0].getHeight() + getTitleBar().getHeight() + 2);
    }
   
    setBackground(new Color(0, 0, 0, 85));
    setResizable(false);
    showBadges();
  }
View Full Code Here


    List<String> translated = Translator.translate("_LOGIN");
    this.setBorderRendered(false);
    this.getTitleBar().setVisible(false);
    this.setSize(320, 160);
    this.setLocation(480, 424);
    this.setBackground(new Color(0, 0, 0, 140));
    this.setDraggable(false);
    this.setResizable(false);
   
    /*
     * Set up the components
     */
    m_white = new Color(255, 255, 255);
   
    m_username = new TextField();
    m_username.setSize(132, 24);
    m_username.setLocation(128, 8);
    m_username.setVisible(true);
View Full Code Here

            super.mouseReleased(e);
            destroyPopup();
          }
        });

    setBackground(new Color(0, 0, 0, 75));
    setTitle("Bag");
    setResizable(false);
    setHeight(250);
    setWidth(m_categoryButtons.length * 80);
    setVisible(true);
 
View Full Code Here

      @Override
      public void mousePressed(MouseEvent e) {
        destroyPopup();
      }
    });
    setBackground(new Color(0,0,0,150));
    if (!isBattle)
      setSize(100, 140);
    else
      setSize(100, 115);
    getTitleBar().setVisible(false);
View Full Code Here

            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) {}
    }
   
    // Frame configuration
    setBackground(new Color(0,0,0,150));
    setSize(100, 115);
    getTitleBar().setVisible(false);
    setVisible(true);
    setResizable(false);
    setAlwaysOnTop(true);
View Full Code Here

   * Default constructor
   */
  public ServerDialog() {
    getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
    m_black = new Color(0, 0, 0);
    List<String> translate = Translator.translate("_LOGIN");
   
    this.setSize(316, 280);
    this.setLocation(400 - 160, 280);
    this.setTitle(translate.get(0));
    this.setBackground(new Color(0, 0, 0, 140));
    this.getTitleBar().setForeground(m_black);
    this.setDraggable(false);
    this.setResizable(false);
    this.getTitleBar().getCloseButton().setVisible(false);
   
    /*
     * Create the info label
     */
    m_info = new Label(translate.get(1));
    m_info.pack();
    m_info.setLocation(24, 8);
    m_info.setForeground(new Color(255, 255, 255));
    this.add(m_info);
   
    /*
     * Create all the server buttons
     */
 
View Full Code Here

  public void initGUI() {
    InputStream f;
    int y = -8;
    this.getTitleBar().getCloseButton().setVisible(false);
    this.setFont(GameClient.getFontSmall());
    this.setBackground(new Color(0, 0, 0, 85));
    this.setForeground(new Color(255, 255, 255));
    for (int i = 0; i < 6; i++) {
      final int j = i;
      m_container[i] = new Container();
      m_container[i].setSize(170, 42);
      m_container[i].setVisible(true);
      m_container[i].setLocation(2, y+10);
      m_container[i].setBackground(new Color(0, 0, 0, 0));
      System.out.println("Y: "+y);
      getContentPane().add(m_container[i]);
      y += 41;
      m_container[i].setOpaque(true);
      String respath = System.getProperty("res.path");
      if(respath==null)
        respath="";
      try {
        Label tempLabel = new Label();
        if (i ==0) {
          f = FileLoader.loadFile(respath+"res/ui/party_info/partyActive.png");
          tempLabel = new Label(new Image(f, respath+"res/ui/party_info/partyActive.png", false));
        } else {
          f = FileLoader.loadFile(respath+"res/ui/party_info/partyInactive.png");
          tempLabel = new Label(new Image(f, respath+"res/ui/party_info/partyInactive.png", false));
        }
        tempLabel.setSize(170, 42);
        tempLabel.setY(-4);
        m_container[i].add(tempLabel);
      } catch (Exception e) {e.printStackTrace();}
     
      try{
        f = FileLoader.loadFile(respath+"res/ui/party_info/HPBar.png");
        m_hpBar[i] = new Label(new Image(f, respath+"res/ui/party_info/HPBar.png", false));
        m_hpBar[i].setSize(98, 11);
        m_hpBar[i].setVisible(false);
        m_container[i].add(m_hpBar[i]);
      } catch (Exception e) {e.printStackTrace();}
     
      try {
        m_container[i].add(m_pokeBall[i]);
        m_pokeBall[i].setLocation(4, 4);
        m_pokeName[i].setFont(GameClient.getFontSmall());
        m_pokeName[i].setForeground(new Color(255, 255, 255));
        m_pokeName[i].addMouseListener(new MouseAdapter() {

          @Override
          public void mouseReleased(MouseEvent e) {
            super.mouseReleased(e);
            PokemonInfoDialog info = new PokemonInfoDialog(m_pokes[j]);
            info.setAlwaysOnTop(true);
            info.setLocationRelativeTo(null);
            getDisplay().add(info);
          }

          @Override
          public void mouseEntered(MouseEvent e) {
            super.mouseEntered(e);
            m_pokeName[j].setForeground(new Color(255, 215, 0));
          }

          @Override
          public void mouseExited(MouseEvent e) {
            super.mouseExited(e);
            m_pokeName[j].setForeground(new Color(255, 255, 255));
          }

        });
        m_container[i].add(m_pokeIcon[i]);
        m_pokeIcon[i].setLocation(2, 3);
        m_container[i].add(m_pokeName[i]);
        m_pokeName[i].setLocation(42, 5);
        m_container[i].add(m_level[i]);
        m_level[i].setFont(GameClient.getFontSmall());
        m_level[i].setForeground(new Color(255, 255, 255));
        m_level[i].setLocation(m_pokeName[i].getX()
            + m_pokeName[i].getWidth() + 10, m_pokeName[i].getY());
        m_container[i].add(m_hp[i]);
        m_hp[i].setSize(72, 5);
        m_hp[i].setLocation(m_hpBar[i].getX() + 23, m_hpBar[i].getY() + 3);
View Full Code Here

      getContentPane().setX(getContentPane().getX() - 1);
    getContentPane().setY(getContentPane().getY() + 1);
      List<String> translated = Translator.translate("_GUI");
      this.getTitleBar().getCloseButton().setVisible(false);
      this.setTitle(translated.get(20));
      this.setBackground(new Color(0, 0, 0, 85));
      this.setForeground(new Color(255, 255, 255));
          
      this.setLocation(200, 0);
      this.setResizable(false);
          
      helptext = new TextArea();
      helptext.setSize(355, 455);
      //setText Mover stuff to help panel.
      helptext.setText(translated.get(21) +
          translated.get(22) +
          translated.get(23) +
          translated.get(24) +
          translated.get(25) +
          translated.get(26));
//      helptext.setFont(GlobalGame.getDPFontSmall());
      helptext.setForeground(new Color(255, 255, 255));
      helptext.setBackground(new Color(0, 0, 0, 18));
      helptext.setBorderRendered(false);
      helptext.setEditable(false);
      helptext.setWrapEnabled(true);
      this.setSize(360, 460);
      this.add(helptext);
View Full Code Here

     * learnColor.setLocation(10, 70);
     *
     * getContentPane().add(learnColor); }
     */
    List<String> translated = Translator.translate("_GUI");
    setBackground(new Color(0, 0, 0, 70));
    {
     
      m_fullScreen = new CheckBox(translated.get(16));
      m_fullScreen.pack();
      m_fullScreen.setLocation(10, 10);
View Full Code Here

  /**
   * Initializes the interface
   */
  private void initComponents() {
    LoadingList.setDeferredLoading(true);
    this.setBackground(new Color(0, 0, 0, 0));
    String respath = System.getProperty("res.path");
    if(respath==null)
      respath="";
    try {
      f = FileLoader.loadFile(respath+"res/ui/bg.png");
      m_bg = new Label(new Image(f, respath+"res/ui/bg.png", false));
    } catch (SlickException e) {
      e.printStackTrace();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }
    m_bg.setSize(256, 203);
    m_bg.setLocation(0, 142);
    getContentPane().add(m_bg);

    attackPane = new Container();
    attackPane.setBackground(new Color(0, 0, 0, 0));

    move1 = BattleButtonFactory.getButton("");
    move2 = BattleButtonFactory.getButton("");
    move3 = BattleButtonFactory.getButton("");
    move4 = BattleButtonFactory.getButton("");

    setResizable(false);

    this.getTitleBar().setVisible(false);

    // start attackPane
    attackPane.add(move1);
    move1.setLocation(7, 10);
    move1.setSize(116, 51);
    move1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        useMove(0);
      }
    });
    pp1 = new Label();
    pp1.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
    pp1.setBounds(0, move1.getHeight() - 20, move1.getWidth() - 5, 20);
    move1.add(pp1);

    attackPane.add(move2);
    move2.setLocation(130, 10);
    move2.setSize(116, 51);
    move2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        useMove(1);
      }
    });
    pp2 = new Label();
    pp2.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
    pp2.setBounds(0, move2.getHeight() - 20, move2.getWidth() - 5, 20);
    move2.add(pp2);

    attackPane.add(move3);
    move3.setLocation(7, 65);
    move3.setSize(116, 51);
    move3.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        useMove(2);
      }
    });
    pp3 = new Label();
    pp3.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
    pp3.setBounds(0, move3.getHeight() - 20, move3.getWidth() - 5, 20);
    move3.add(pp3);

    attackPane.add(move4);
    move4.setLocation(130, 65);
    move4.setSize(116, 51);
    move4.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        useMove(3);
      }
    });
    pp4 = new Label();
    pp4.setHorizontalAlignment(Label.RIGHT_ALIGNMENT);
    pp4.setBounds(0, move4.getHeight() - 20, move4.getWidth() - 5, 20);
    move4.add(pp4);

    pp1.setFont(GameClient.getFontSmall());
    pp2.setFont(GameClient.getFontSmall());
    pp3.setFont(GameClient.getFontSmall());
    pp4.setFont(GameClient.getFontSmall());
   
    pp1.setForeground(Color.white);
    pp2.setForeground(Color.white);
    pp3.setForeground(Color.white);
    pp4.setForeground(Color.white);
   
    m_moveButtons.add(move1);
    m_moveButtons.add(move2);
    m_moveButtons.add(move3);
    m_moveButtons.add(move4);

    m_ppLabels.add(pp1);
    m_ppLabels.add(pp2);
    m_ppLabels.add(pp3);
    m_ppLabels.add(pp4);

    btnRun = BattleButtonFactory.getSmallButton("Run");
    btnRun.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        run();
      }
    });
    attackPane.add(btnRun);

    btnRun.setBounds(97, 148, 60, 47);

    btnBag = BattleButtonFactory.getSmallButton("Bag");
    attackPane.add(btnBag);
    btnBag.setLocation(3, 122);
    btnBag.setSize(82, 48);

    btnBag.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        showBag();
      }
    });

    btnPoke = BattleButtonFactory.getSmallButton("Pokemon");
    attackPane.add(btnPoke);
    btnPoke.setLocation(168, 122);
    btnPoke.setSize(82, 48);

    btnPoke.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        showPokePane(false);
      }
    });

    cancel = BattleButtonFactory.getSmallButton("Cancel");
    attackPane.add(cancel);
    cancel.setVisible(false);
    cancel.setLocation(162, 110);
    cancel.setSize(82, 48);

    cancel.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {

      }
    });

    attackPane.setBounds(2, 140, 257, 201);
    getContentPane().add(attackPane);
    // end attackPane

    // start pokesContainer
    pokesContainer = new Container();
    pokesContainer.setBackground(new Color(0, 0, 0, 0));
    pokesContainer.setBounds(2, 140, 257, 201);

    pokeBtn1 = BattleButtonFactory.getButton(" ");
    pokesContainer.add(pokeBtn1);
    pokeBtn1.setBounds(8, 8, 116, 51);

    pokeBtn1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        switchPoke(0);
      }
    });

    pokeBtn2 = BattleButtonFactory.getButton(" ");
    pokesContainer.add(pokeBtn2);
    pokeBtn2.setBounds(128, 8, 116, 51);

    pokeBtn2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        switchPoke(1);
      }
    });

    pokeBtn3 = BattleButtonFactory.getButton(" ");
    pokesContainer.add(pokeBtn3);
    pokeBtn3.setBounds(8, 59, 116, 51);

    pokeBtn3.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        switchPoke(2);
      }
    });

    pokeBtn4 = BattleButtonFactory.getButton(" ");
    pokesContainer.add(pokeBtn4);
    pokeBtn4.setBounds(128, 59, 116, 51);

    pokeBtn4.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        switchPoke(3);
      }
    });

    pokeBtn5 = BattleButtonFactory.getButton(" ");
    pokesContainer.add(pokeBtn5);
    pokeBtn5.setBounds(8, 110, 116, 51);

    pokeBtn5.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        switchPoke(4);
      }
    });

    pokeBtn6 = BattleButtonFactory.getButton(" ");
    pokesContainer.add(pokeBtn6);
    pokeBtn6.setBounds(128, 110, 116, 51);

    pokeBtn6.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        switchPoke(5);
      }
    });

    m_pokeButtons.add(pokeBtn1);
    m_pokeButtons.add(pokeBtn2);
    m_pokeButtons.add(pokeBtn3);
    m_pokeButtons.add(pokeBtn4);
    m_pokeButtons.add(pokeBtn5);
    m_pokeButtons.add(pokeBtn6);

    for (int i = 0; i < 6; i++){
      Label status = new Label();
      status.setSize(30, 12);
      status.setGlassPane(true);
      m_pokeButtons.get(i).add(status);
      status.setLocation(6, 5);
     
      Label info = new Label();
      m_pokeButtons.get(i).add(info);
      info.setText("                               ");
      info.setLocation(3, 34);
      info.setSize(107, 14);
      info.setForeground(Color.white);
      info.setGlassPane(true);
      info.setFont(GameClient.getFontSmall());
      m_pokeInfo.add(info);
    }

    pokeCancelBtn = BattleButtonFactory.getSmallButton("Cancel");
    pokesContainer.add(pokeCancelBtn);
    pokeCancelBtn.setLocation(162, 161);
    pokeCancelBtn.setSize(82, 48);
   
    pokeCancelBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        showAttack();
      }
    });
    pokesContainer.setVisible(false);
    getContentPane().add(pokesContainer);
    // End pokesContainer

    endPane = new Container();
    endPane.setBackground(new Color(0, 0, 0, 0));
    getContentPane().add(endPane);
    endPane.setBounds(0, 154, 253, 192);

    close = new Button();
    close.setVisible(true);
View Full Code Here

TOP

Related Classes of org.newdawn.slick.Color

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.