All pastes #388618 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-10 05:10 UTC
rendered paste body
/*
 * HealthBar.java
 *
 * Created on March 9, 2007, 8:21 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package smj.gui;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

/**
 *
 * @author kcbanner
 */
public class HealthBar extends DraggableWindow {
    
    private Image background;
    
    /** Creates a new instance of HealthBar */
    public HealthBar(GameContainer c) {
        super(c);
        try {
            background = new Image("res/gui/healthbar.png");
        } catch (SlickException ex) {
            ex.printStackTrace();
        }
        setBounds(10,10,(float) background.getWidth(), (float) background.getHeight());
    }
    
    public void draw() {
        background.draw(bounds.x, bounds.y);
    } 
    
}