public abstract class InterfaceTile extends InterfaceObject implements org.newdawn.slick.MouseListener
Constructor and Description |
---|
InterfaceTile(org.newdawn.slick.Image iconImg,
org.newdawn.slick.GameContainer gc,
java.lang.String info)
InterfaceTile constructor
|
InterfaceTile(java.io.InputStream fileInput,
java.lang.String ref,
boolean flipped,
org.newdawn.slick.GameContainer gc,
java.lang.String info)
InterfaceTile constructor
|
Modifier and Type | Method and Description |
---|---|
void |
click(boolean click) |
void |
dragged(boolean dragged) |
void |
draw(float x,
float y,
boolean scaledPos)
Draws object
|
void |
draw(float x,
float y,
org.newdawn.slick.Color filter,
boolean scaledPos)
Draws object with specified color
|
float |
getScaledHeight()
Returns height of object corrected by scale
|
float |
getScaledWidth()
Returns width of object corrected by scale
|
boolean |
isDragged()
Checks if icon is dragged
|
void |
mousePressed(int button,
int x,
int y) |
atCenter, draw, draw, draw, draw, draw, draw, getDis, getPos, getScale, getSize, isMouseOver, setInfo, setPosition, setSize
bind, clampTexture, copy, destroy, draw, draw, draw, draw, draw, draw, drawCentered, drawEmbedded, drawEmbedded, drawEmbedded, drawFlash, drawFlash, drawFlash, drawSheared, drawSheared, drawWarped, endUse, ensureInverted, flushPixelData, getAlpha, getCenterOfRotationX, getCenterOfRotationY, getColor, getFilter, getFlippedCopy, getGraphics, getHeight, getName, getResourceReference, getRotation, getScaledCopy, getScaledCopy, getSubImage, getTexture, getTextureHeight, getTextureOffsetX, getTextureOffsetY, getTextureWidth, getWidth, isDestroyed, rotate, setAlpha, setCenterOfRotation, setColor, setColor, setFilter, setImageColor, setImageColor, setName, setRotation, setTexture, startUse, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public InterfaceTile(java.io.InputStream fileInput, java.lang.String ref, boolean flipped, org.newdawn.slick.GameContainer gc, java.lang.String info) throws org.newdawn.slick.SlickException, java.io.IOException, java.awt.FontFormatException
fileInput
- Input stream to imageref
- Name for imageflipped
- If image should be filppedgc
- Slick game containerinfo
- Info from contentorg.newdawn.slick.SlickException
java.io.IOException
java.awt.FontFormatException
public InterfaceTile(org.newdawn.slick.Image iconImg, org.newdawn.slick.GameContainer gc, java.lang.String info) throws org.newdawn.slick.SlickException, java.io.IOException, java.awt.FontFormatException
iconImg
- Icon imagegc
- Slick game containerinfo
- Info from contentorg.newdawn.slick.SlickException
java.io.IOException
java.awt.FontFormatException
public void draw(float x, float y, boolean scaledPos)
InterfaceObject
draw
in class InterfaceObject
x
- Position on x axisy
- Position on y axisscaledPos
- True if object position should be scaledpublic void draw(float x, float y, org.newdawn.slick.Color filter, boolean scaledPos)
InterfaceObject
draw
in class InterfaceObject
x
- Position on x axisy
- Position on y axisfilter
- Color for objectscaledPos
- True if object position should be scaledpublic void dragged(boolean dragged)
public void click(boolean click)
public float getScaledWidth()
InterfaceObject
getScaledWidth
in class InterfaceObject
public float getScaledHeight()
InterfaceObject
getScaledHeight
in class InterfaceObject
public boolean isDragged()
public void mousePressed(int button, int x, int y)
mousePressed
in interface org.newdawn.slick.MouseListener