mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-10-12 09:56:33 +02:00
Hehomon Beispiel implementiert
Noch Bugs bei Verwendung des Vollbildmodus vorhanden
This commit is contained in:
30
examples/zm_hehomon/Display.java
Normal file
30
examples/zm_hehomon/Display.java
Normal file
@@ -0,0 +1,30 @@
|
||||
import schule.ngb.zm.Drawable;
|
||||
import schule.ngb.zm.Options;
|
||||
import schule.ngb.zm.shapes.Rectangle;
|
||||
import schule.ngb.zm.shapes.ShapeGroup;
|
||||
import schule.ngb.zm.shapes.Text;
|
||||
|
||||
public class Display extends ShapeGroup {
|
||||
|
||||
private Rectangle background;
|
||||
|
||||
private Text text;
|
||||
|
||||
public Display( int pX, int pY ) {
|
||||
super(pX, pY);
|
||||
background = new Rectangle(0, 0, 400, 110);
|
||||
background.setFillColor(0, 133);
|
||||
|
||||
text = new Text(5, 5, "Der Kampf beginnt");
|
||||
text.setFontColor(255);
|
||||
text.setFontsize(20);
|
||||
text.setAnchor(NORTHWEST);
|
||||
|
||||
add(background, text);
|
||||
}
|
||||
|
||||
public void setText( String pText ) {
|
||||
text.setText(pText);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user