added new tiles and actions:
* Tile displaying text * TextDisplay: an action that sends text to clients * DetermineTrainInBlock: action that alters the context by requesting the train in a specific block
This commit is contained in:
23
src/main/java/de/srsoftware/web4rail/actions/ShowText.java
Normal file
23
src/main/java/de/srsoftware/web4rail/actions/ShowText.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package de.srsoftware.web4rail.actions;
|
||||
|
||||
import de.srsoftware.web4rail.tags.Label;
|
||||
|
||||
public class ShowText extends TextAction{
|
||||
|
||||
|
||||
@Override
|
||||
public boolean fire(Context context) {
|
||||
plan.stream(fill(text,context));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Label label() {
|
||||
return new Label(t("Text to display on clients:")+NBSP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return t("Display \"{}\" on clients.",text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user