public class TextInput extends InterfaceObject implements org.newdawn.slick.MouseListener, org.newdawn.slick.KeyListener, org.newdawn.slick.gui.ComponentListener
Constructor and Description |
---|
TextInput(java.io.InputStream inputToBG,
java.lang.String ref,
boolean flipped,
float width,
float height,
org.newdawn.slick.GameContainer gc)
TextInput constructor (with custom size)
|
TextInput(java.io.InputStream inputToBG,
java.lang.String ref,
boolean flipped,
org.newdawn.slick.GameContainer gc)
TextInput constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
componentActivated(org.newdawn.slick.gui.AbstractComponent source) |
void |
draw(float x,
float y,
boolean scaledPos)
Draws object
|
java.lang.String |
getText() |
void |
inputEnded() |
void |
inputStarted() |
boolean |
isAcceptingInput() |
void |
keyPressed(int key,
char c) |
void |
keyReleased(int key,
char c) |
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 |
render(org.newdawn.slick.Graphics g) |
void |
setInput(org.newdawn.slick.Input input) |
void |
setText(java.lang.String text) |
void |
showBorder(boolean border) |
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 TextInput(java.io.InputStream inputToBG, java.lang.String ref, boolean flipped, org.newdawn.slick.GameContainer gc) throws org.newdawn.slick.SlickException, java.awt.FontFormatException, java.io.IOException
inputToBG
- IntputStream to background imageref
- Name for bg image on systemflipped
- If bg image should be flippedgc
- Slick game containerorg.newdawn.slick.SlickException
java.awt.FontFormatException
java.io.IOException
public TextInput(java.io.InputStream inputToBG, java.lang.String ref, boolean flipped, float width, float height, org.newdawn.slick.GameContainer gc) throws org.newdawn.slick.SlickException, java.io.IOException, java.awt.FontFormatException
inputToBG
- IntputStream to background imageref
- Name for bg image on systemflipped
- If bg image should be flippedwidth
- Width for fieldheight
- Height for fieldgc
- Slick game containerorg.newdawn.slick.SlickException
java.awt.FontFormatException
java.io.IOException
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 render(org.newdawn.slick.Graphics g)
public java.lang.String getText()
public void clear()
public void showBorder(boolean border)
public void setText(java.lang.String text)
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
public void keyPressed(int key, char c)
keyPressed
in interface org.newdawn.slick.KeyListener
public void keyReleased(int key, char c)
keyReleased
in interface org.newdawn.slick.KeyListener
public void componentActivated(org.newdawn.slick.gui.AbstractComponent source)
componentActivated
in interface org.newdawn.slick.gui.ComponentListener