public abstract class InterfaceObject
extends org.newdawn.slick.Image
Modifier and Type | Method and Description |
---|---|
Position |
atCenter()
Returns position in the center of the screen for this object and current resolution
|
void |
draw()
Draws object on current position
(position is scaled)
|
void |
draw(float x,
float y)
Draws object
|
void |
draw(float x,
float y,
boolean scaledPos)
Draws object
|
void |
draw(float x,
float y,
org.newdawn.slick.Color filter)
Draws object with specific color
|
void |
draw(float x,
float y,
org.newdawn.slick.Color filter,
boolean scaledPos)
Draws object with specified color
|
void |
draw(float x,
float y,
float width,
float height)
Draws object with specific width and height
|
void |
draw(float x,
float y,
float width,
float height,
boolean scaledPos)
Draws object with specific width and height
|
void |
draw(float x,
float y,
float width,
float height,
org.newdawn.slick.Color filter,
boolean scaledPos)
Draws object with specified color and size
|
int |
getDis(int rawDistance)
Returns distance corrected by scale
|
Position |
getPos()
Returns object position
|
float |
getScale()
Returns scale based on current resolution
|
float |
getScaledHeight()
Returns height of object corrected by scale
|
float |
getScaledWidth()
Returns width of object corrected by scale
|
float |
getSize(float size)
Returns size corrected by scale
|
boolean |
isMouseOver()
Checks if mouse is over object
|
void |
setInfo(java.lang.String info)
Sets specified text as object info
|
void |
setPosition(float x,
float y)
Sets object position
|
void |
setSize(float width,
float height)
Sets object size
|
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
public boolean isMouseOver()
public void draw()
draw
in class org.newdawn.slick.Image
public void draw(float x, float y)
draw
in interface org.newdawn.slick.Renderable
draw
in class org.newdawn.slick.Image
x
- Position on x axisy
- Position on y axispublic void draw(float x, float y, org.newdawn.slick.Color filter)
draw
in class org.newdawn.slick.Image
x
- Position on x axisy
- Position on y axisfilter
- Color for objectpublic void draw(float x, float y, float width, float height)
draw
in class org.newdawn.slick.Image
x
- Position on x axisy
- Position on y axiswidth
- Width for objectheight
- Height for objectpublic void draw(float x, float y, float width, float height, boolean scaledPos)
x
- Position on x axisy
- Position on y axiswidth
- Width for objectheight
- Height for objectscaledPos
- True if object position should be scaledpublic void draw(float x, float y, boolean scaledPos)
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)
x
- Position on x axisy
- Position on y axisfilter
- Color for objectscaledPos
- True if object position should be scaledpublic void draw(float x, float y, float width, float height, org.newdawn.slick.Color filter, boolean scaledPos)
x
- Position on x axisy
- Position on y axiswitdh
- Width for objectheight
- Height for objectfilter
- Color for objectscaledPos
- True if position should be scaled to current resolutionpublic float getScale()
public int getDis(int rawDistance)
rawDistance
- Distance on 1920x1080public float getSize(float size)
size
- Raw float sizepublic Position getPos()
public float getScaledWidth()
public float getScaledHeight()
public Position atCenter()
public void setInfo(java.lang.String info)
info
- String with text for infopublic void setPosition(float x, float y)
x
- Position on x-axisy
- Position on y-axispublic void setSize(float width, float height)
width
- Widthheight
- Height