package com.lucasdnd.ags.ui;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import com.lucasdnd.ags.system.ResourceLoader;
public class UIOverlay extends UIComponent {
private Image imageOverlay; // The white rectangle
public UIOverlay(int width, int height) throws SlickException {
imageOverlay = ResourceLoader.getInstance().uiOverlay;
// Calculates the x position on the screen
xPos = (width - imageOverlay.getWidth()) / 2;
yPos = height - imageOverlay.getHeight();
}
public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException {
g.drawImage(imageOverlay, xPos, yPos);
}
}