public final class TextSwitch extends InterfaceObject implements org.newdawn.slick.MouseListener
Constructor and Description |
---|
TextSwitch(org.newdawn.slick.GameContainer gc,
java.lang.String label,
java.lang.String[] textToSwitch)
Text switch constructor
|
TextSwitch(org.newdawn.slick.GameContainer gc,
java.lang.String label,
java.lang.String[] textToSwitch,
java.lang.String info)
Text switch constructor(with info window)
|
Modifier and Type | Method and Description |
---|---|
void |
draw(float x,
float y,
boolean scaledPos)
Draws switch
|
java.lang.String |
getString()
Returns current switch value
|
int |
getValueId()
Returns current value ID
|
void |
inputEnded() |
void |
inputStarted() |
boolean |
isAcceptingInput() |
boolean |
isChange()
Checks if switch value been changed
|
void |
mouseClicked(int button,
int x,
int y,
int clickCount) |
void |
mouseDragged(int oldx,
int oldy,
int newx,
int newy) |
void |
mouseMoved(int oldx,
int oldy,
int newx,
int newy) |
void |
mousePressed(int button,
int x,
int y) |
void |
mouseReleased(int button,
int x,
int y) |
void |
mouseWheelMoved(int change) |
void |
setInput(org.newdawn.slick.Input input) |
atCenter, draw, draw, draw, draw, draw, draw, draw, getDis, getPos, getScale, getScaledHeight, getScaledWidth, 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
public TextSwitch(org.newdawn.slick.GameContainer gc, java.lang.String label, java.lang.String[] textToSwitch) throws org.newdawn.slick.SlickException, java.awt.FontFormatException, java.io.IOException
gc
- Slick game containertextToSwitch
- String with all text values to switchorg.newdawn.slick.SlickException
java.awt.FontFormatException
java.io.IOException
public TextSwitch(org.newdawn.slick.GameContainer gc, java.lang.String label, java.lang.String[] textToSwitch, java.lang.String info) throws org.newdawn.slick.SlickException, java.awt.FontFormatException, java.io.IOException
gc
- Slick game containertextToSwitch
- textToSwitch String with all text values to switchinfo
- Text for infoorg.newdawn.slick.SlickException
java.awt.FontFormatException
java.io.IOException
public void draw(float x, float y, boolean scaledPos)
draw
in class InterfaceObject
x
- Position on x axisy
- Position on y axisscaledPos
- True if object position should be scaledpublic java.lang.String getString()
public int getValueId()
public boolean isChange()
public void inputEnded()
inputEnded
in interface org.newdawn.slick.ControlledInputReciever
public void inputStarted()
inputStarted
in interface org.newdawn.slick.ControlledInputReciever
public boolean isAcceptingInput()
isAcceptingInput
in interface org.newdawn.slick.ControlledInputReciever
public void setInput(org.newdawn.slick.Input input)
setInput
in interface org.newdawn.slick.ControlledInputReciever
public void mouseClicked(int button, int x, int y, int clickCount)
mouseClicked
in interface org.newdawn.slick.MouseListener
public void mouseDragged(int oldx, int oldy, int newx, int newy)
mouseDragged
in interface org.newdawn.slick.MouseListener
public void mouseMoved(int oldx, int oldy, int newx, int newy)
mouseMoved
in interface org.newdawn.slick.MouseListener
public void mousePressed(int button, int x, int y)
mousePressed
in interface org.newdawn.slick.MouseListener
public void mouseReleased(int button, int x, int y)
mouseReleased
in interface org.newdawn.slick.MouseListener
public void mouseWheelMoved(int change)
mouseWheelMoved
in interface org.newdawn.slick.MouseListener