public class Console
extends java.lang.Object
Constructor and Description |
---|
Console(com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
int xPos,
int yPos) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String message)
Adds a message with the sender "System"
|
void |
add(java.lang.String message,
java.lang.String sender) |
void |
add(java.lang.String message,
java.lang.String sender,
int importance) |
void |
enter()
when a message is entered
|
boolean |
executeCommand(java.lang.String command)
Tries executing a command
|
java.lang.String |
getLastMessage()
Returns the last Message
|
java.lang.String |
getLastMessage(java.lang.String sender)
Returns the last Message
|
boolean |
isActive()
Is the window open?
|
void |
render(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
Draws the Messages
|
void |
setGameplayRef(GameplayScreen gameplayRef) |
void |
setText(java.lang.String text)
Set the text in the box.
|
void |
update(float delta)
Updates the Message System.
|
public Console(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, int xPos, int yPos)
skin
- xPos
- yPos
- public void setGameplayRef(GameplayScreen gameplayRef)
gameplayRef
- public void add(java.lang.String message)
message
- public void add(java.lang.String message, java.lang.String sender)
message
- sender
- public void add(java.lang.String message, java.lang.String sender, int importance)
message
- sender
- importance
- public void update(float delta)
delta
- time in mspublic void render(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
batch
- public void enter()
public boolean isActive()
public java.lang.String getLastMessage()
public java.lang.String getLastMessage(java.lang.String sender)
sender
- filter by the sender, e.g. if you want the last message of a specific playerpublic void setText(java.lang.String text)
text
- public boolean executeCommand(java.lang.String command)
command
-