Package org.newdawn.slick

Examples of org.newdawn.slick.Image


        f = new FileInputStream(respath+"res/pokenet_summer.png");
      } else {
        /* Show normal login screen */
        f = new FileInputStream(respath+"res/pokenet_normal.png");
      }
      m_bg = new Label(new Image(f, "bg", false));
      m_bg.pack();
      m_bg.setLocation(0, 0);
      m_bg.setVisible(true);
      this.add(m_bg);
     
View Full Code Here


       
        private static Image getRolloverImage(String text) throws SlickException {
          String respath = System.getProperty("res.path");
        if(respath==null)
          respath="";
            return new Image(respath+"res/ui/" + text + "_32x32.png", false);
        }
View Full Code Here

       
        private static Image getNormalImage(String text) throws SlickException {
          String respath = System.getProperty("res.path");
        if(respath==null)
          respath="";
            return new Image(respath+"res/ui/" + text + "_32x32.png", false);
        }
View Full Code Here

       
        private static Image getDownImage(String text) throws SlickException {
          String respath = System.getProperty("res.path");
        if(respath==null)
          respath="";
          return new Image(respath+"res/ui/" + text + "Pressed_32x32.png", false);
        }
View Full Code Here

    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", false));
    } catch (SlickException e) {
      e.printStackTrace();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }
View Full Code Here

      this.setBackground(new Color(255, 255, 255, 70));
      this.setLocation(0, -32);
      this.setResizable(false);
      this.getTitleBar().setVisible(false);
     
      m_bg = new Label(new Image(respath+"res/ui/loading.png", false));
      m_bg.pack();
      m_bg.setLocation(400 - (m_bg.getWidth() / 2), 300 - (m_bg.getHeight() /2));
      m_bg.setVisible(true);
      this.add(m_bg);
     
View Full Code Here

              if (m_item.getCategory().equalsIgnoreCase("TM")){
                f = FileLoader.loadFile(respath+"res/items/48/TM.png");
              } else {
                f = FileLoader.loadFile(respath+"res/items/48/" + m_item.getId() + ".png");
              }
              m_bagImage = new Image(f, respath+"res/items/48/" + m_item.getId() + ".png", false);
              LoadingList.setDeferredLoading(false);
             
            } catch (Exception e){
              try {
              InputStream f;
              LoadingList.setDeferredLoading(true);
              f = FileLoader.loadFile(respath+"res/items/48/0.png");
              m_bagImage = new Image(f, respath+"res/items/48/0.png", false);
              LoadingList.setDeferredLoading(false);
              } catch (Exception e2){
                e2.printStackTrace();
              }
            }
View Full Code Here

    super(tileSetsLocation);
    String respath = System.getProperty("res.path");
    if(respath==null)
      respath="";
    try {
      m_grassOverlay = new Image(respath+"res/ui/grass_overlay.png", false);
    } catch (Exception e) {
      e.printStackTrace();
    }
    m_xOffsetModifier = Integer.parseInt(getMapProperty("xOffsetModifier",
        "0").trim());
View Full Code Here

          p.getCurrentImage().draw(m_xOffset + p.getX() - 4,
              m_yOffset + p.getY());
          if (m_curMap.shouldReflect(p)) {
            // If there's a reflection, flip the player's image, set
            // his alpha so its more translucent, and then draw it.
            Image m_reflection = p.getCurrentImage()
                .getFlippedCopy(false, true);
            m_reflection.setAlpha((float) 0.05);
            if (p.getSprite() != -1)
              m_reflection.draw(m_xOffset + p.getX() - 4,
                  m_yOffset + p.getY() + 32);
            else {
              m_reflection.draw(m_xOffset + p.getX() - 4,
                  m_yOffset + p.getY() + 8);
            }
          }
          if (m_curMap.wasOnGrass(p) && m_curMap.isOnGrass(p)) {
            switch (p.getDirection()) {
View Full Code Here

      try {
        path = respath+"res/pokemon/back/" + isShiny + index + "-"
            + String.valueOf(gender) + ".png";
        f = FileLoader.loadFile(path);
        m_backSprite = new Image(f, path.toString(), false);
      } catch (Exception e) {
        if (gender == 3) {
          path = respath+"res/pokemon/back/" + isShiny + index + "-1.png";
        } else {
          path = respath+"res/pokemon/back/" + isShiny + index + "-0.png";
        }
        m_backSprite = new Image(path.toString(), false);
        e.printStackTrace();
      }
    } catch (SlickException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.Image

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.